/* ============================================================
   Options Day Trading Page Styles
   ============================================================ */

/* ─── Layout ─────────────────────────────────────────────── */

.odt-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background: #0d0e12;
    color: #d1d4dc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Toolbar ────────────────────────────────────────────── */

.odt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #131722;
    border-bottom: 1px solid #1e2229;
    flex-shrink: 0;
    gap: 8px;
    height: 38px;
    min-height: 38px;
}

.odt-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.odt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.odt-label {
    font-size: 10px;
    color: #8e9197;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.odt-symbol-input {
    width: 68px;
    padding: 4px 6px;
    background: #1e2229;
    border: 1px solid #2a2e39;
    color: #d1d4dc;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.15s;
}

.odt-symbol-input:focus {
    border-color: #2962ff;
}

.odt-select {
    padding: 4px 6px;
    background: #1e2229;
    border: 1px solid #2a2e39;
    color: #d1d4dc;
    border-radius: 3px;
    font-size: 11px;
    outline: none;
    cursor: pointer;
    max-width: 200px;
}

.odt-select:focus {
    border-color: #2962ff;
}

.odt-type-toggle {
    display: flex;
    border: 1px solid #2a2e39;
    border-radius: 3px;
    overflow: hidden;
}

.odt-type-btn {
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 600;
    border: none;
    background: #1e2229;
    color: #8e9197;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.odt-type-btn:first-child {
    border-right: 1px solid #2a2e39;
}

.odt-type-btn.active {
    background: #2962ff;
    color: #fff;
}

.odt-type-btn:hover:not(.active) {
    background: #252830;
    color: #d1d4dc;
}

.odt-price-label {
    font-size: 14px;
    font-weight: 700;
    color: #d1d4dc;
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: right;
}

/* ─── Main Content Area ──────────────────────────────────── */

.odt-content {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* ─── Strike Gutter (left) ───────────────────────────────── */

.odt-strike-gutter {
    width: 130px;
    min-width: 130px;
    background: #131722;
    border-right: 1px solid #1e2229;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.odt-strike-row {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    gap: 4px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 10px;
    border-radius: 2px;
    margin: 0 3px;
}

.odt-strike-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.odt-strike-row.odt-strike-buy {
    background: rgba(0, 230, 118, 0.12);
    border-left: 2px solid #00e676;
}

.odt-strike-row.odt-strike-buy:hover {
    background: rgba(0, 230, 118, 0.2);
}

.odt-strike-row.odt-strike-sell {
    background: rgba(255, 82, 82, 0.12);
    border-left: 2px solid #ff5252;
}

.odt-strike-row.odt-strike-sell:hover {
    background: rgba(255, 82, 82, 0.2);
}

.odt-strike-state {
    width: 12px;
    font-weight: 700;
    font-size: 9px;
    text-align: center;
}

.odt-strike-buy .odt-strike-state {
    color: #00e676;
}

.odt-strike-sell .odt-strike-state {
    color: #ff5252;
}

.odt-strike-price {
    font-weight: 600;
    color: #d1d4dc;
    font-variant-numeric: tabular-nums;
    min-width: 42px;
}

.odt-strike-bid-ask {
    color: #8e9197;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    font-size: 9px;
}

/* ─── Chart Wrapper ──────────────────────────────────────── */

.odt-chart-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    background: #0d0e12;
}

.odt-chart-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ─── Floating Order Panel (overlays chart right side) ──── */

.odt-order-panel {
    position: absolute;
    top: 50px;
    right: 80px;
    width: 200px;
    background: #1a1d26;
    border: 1px solid #2a2e39;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    /* Allow clicks to pass through to chart beneath when not hitting the panel */
    pointer-events: auto;
}

.odt-order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #2a2e39;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #d1d4dc;
}

.odt-order-close {
    background: none;
    border: none;
    color: #8e9197;
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.odt-order-close:hover {
    color: #ff5252;
}

.odt-order-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.odt-order-leg {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(42, 46, 57, 0.5);
}

.odt-order-leg:last-child {
    border-bottom: none;
}

.odt-leg-action {
    font-weight: 700;
    font-size: 10px;
    width: 28px;
}

.odt-leg-strike {
    flex: 1;
    color: #d1d4dc;
    font-variant-numeric: tabular-nums;
}

.odt-leg-price {
    color: #8e9197;
    font-variant-numeric: tabular-nums;
}

.odt-order-summary {
    padding-top: 6px;
    margin-top: 4px;
    border-top: 1px solid #2a2e39;
    font-size: 11px;
    font-weight: 600;
}

.odt-order-footer {
    padding: 8px 10px;
    border-top: 1px solid #2a2e39;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.odt-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #8e9197;
}

.odt-qty-row label {
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.odt-qty-input {
    width: 50px;
    padding: 3px 6px;
    background: #1e2229;
    border: 1px solid #2a2e39;
    color: #d1d4dc;
    border-radius: 3px;
    font-size: 11px;
    text-align: center;
    outline: none;
}

.odt-qty-input:focus {
    border-color: #2962ff;
}

.odt-submit-btn {
    width: 100%;
    padding: 7px 0;
    background: #2962ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.15s;
}

.odt-submit-btn:hover {
    background: #1e53e5;
}

.odt-submit-btn:active {
    background: #1847cc;
}

/* ─── P&L Strip (right of chart) ─────────────────────────── */

.odt-pnl-strip {
    width: 80px;
    min-width: 80px;
    background: #131722;
    border-left: 1px solid #1e2229;
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.odt-pnl-strip canvas {
    flex: 1;
    display: block;
    width: 100%;
}

.odt-pnl-label {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 8px;
    color: #8e9197;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* ─── Crosshair ──────────────────────────────────────────── */

.odt-crosshair {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.odt-crosshair-h,
.odt-crosshair-v {
    position: absolute;
    background: rgba(100, 100, 120, 0.3);
}

.odt-crosshair-h {
    height: 1px;
    left: 0;
    right: 0;
}

.odt-crosshair-v {
    width: 1px;
    top: 0;
    bottom: 0;
}

.odt-crosshair-label {
    position: absolute;
    background: #2a2e39;
    color: #d1d4dc;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
    white-space: nowrap;
}

/* ─── Scrollbar (gutter) ─────────────────────────────────── */

.odt-strike-gutter::-webkit-scrollbar {
    width: 4px;
}

.odt-strike-gutter::-webkit-scrollbar-track {
    background: transparent;
}

.odt-strike-gutter::-webkit-scrollbar-thumb {
    background: #2a2e39;
    border-radius: 2px;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
    .odt-strike-gutter {
        width: 90px;
        min-width: 90px;
    }
    
    .odt-strike-bid-ask {
        display: none;
    }
    
    .odt-pnl-strip {
        width: 60px;
        min-width: 60px;
    }
    
    .odt-order-panel {
        right: 65px;
        width: 180px;
    }
}
