/* Order Flow Simulations Styles */

/* =====================================================
   ORDER BOOK (DOM) STYLES
   ===================================================== */

.orderbook-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}

.orderbook-header {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.orderbook-stats {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.highlight {
    color: #00d4ff;
}

.stat-value.bullish {
    color: #10b981;
}

.stat-value.bearish {
    color: #ef4444;
}

.book-column-labels {
    display: grid;
    grid-template-columns: 50px 80px 80px 80px 50px;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-primary);
    text-align: center;
}

.orderbook-grid {
    /* Removed max-height and overflow to show full ladder */
}

.book-row {
    display: grid;
    grid-template-columns: 50px 80px 80px 80px 50px;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    position: relative;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.book-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.book-row.top-of-book {
    background: rgba(0, 212, 255, 0.05);
    border-top: 2px solid #00d4ff;
    border-bottom: 2px solid #00d4ff;
}

.book-visualization {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 0;
}

.volume-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.bid-bar {
    background: linear-gradient(to left, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.1));
    float: left;
}

.ask-bar {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.1));
    float: right;
}

.book-orders, .book-size, .book-price {
    position: relative;
    z-index: 1;
    text-align: center;
}

.book-orders, .book-orders-placeholder {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.book-size {
    font-weight: 600;
}

.bid-row .book-size {
    color: #10b981;
}

.ask-row .book-size {
    color: #ef4444;
}

.book-price {
    font-weight: 700;
}

.bid-price {
    color: #10b981;
}

.ask-price {
    color: #ef4444;
}

.spread-indicator {
    padding: 0.75rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-top: 2px solid #00d4ff;
    border-bottom: 2px solid #00d4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.spread-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #00d4ff, transparent);
}

.spread-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =====================================================
   BOOKMAP HEATMAP STYLES
   ===================================================== */

.heatmap-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
}

#bookmapCanvas {
    width: 100%;
    display: block;
    border-radius: 4px;
    background: #0a0e27;
}

.heatmap-legend {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

.legend-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.gradient-bar {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.gradient-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* =====================================================
   FOOTPRINT CHART STYLES
   ===================================================== */

.footprint-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

.footprint-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.footprint-header h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.footprint-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.85rem;
}

.footprint-grid {
    display: flex;
    gap: 0.5rem;
    min-width: min-content;
}

.footprint-bar {
    min-width: 90px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    overflow: hidden;
}

.bar-header {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-primary);
}

.bar-header.bullish {
    background: rgba(16, 185, 129, 0.1);
}

.bar-header.bearish {
    background: rgba(239, 68, 68, 0.1);
}

.bar-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.bar-delta {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.delta-positive {
    color: #10b981;
}

.delta-negative {
    color: #ef4444;
}

.footprint-levels {
    padding: 0.25rem;
}

.footprint-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.25rem;
    padding: 0.25rem;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    align-items: center;
    border-radius: 2px;
    margin-bottom: 1px;
}

.footprint-row.buy-dominant {
    background: rgba(16, 185, 129, 0.15);
}

.footprint-row.sell-dominant {
    background: rgba(239, 68, 68, 0.15);
}

.footprint-row.balanced {
    background: rgba(107, 114, 128, 0.1);
}

.fp-buy {
    text-align: right;
    color: #10b981;
    font-weight: 600;
}

.fp-price {
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    padding: 0 0.25rem;
}

.fp-sell {
    text-align: left;
    color: #ef4444;
    font-weight: 600;
}

.bar-cumulative-delta {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-primary);
    background: rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .book-row {
        grid-template-columns: 40px 70px 70px 70px 40px;
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    .book-column-labels {
        grid-template-columns: 40px 70px 70px 70px 40px;
        padding: 0.5rem;
        font-size: 0.65rem;
    }

    .footprint-bar {
        min-width: 70px;
    }

    .footprint-row {
        font-size: 0.65rem;
    }
}
