/* Market Profile TPO Styles */

.tpo-profile-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

.tpo-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
}

.tpo-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tpo-legend .legend-marker {
    width: 20px;
    height: 4px;
    border-radius: 2px;
}

.tpo-legend span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tpo-legend strong {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.tpo-chart {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.tpo-rows {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    min-width: 800px;
}

.tpo-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.tpo-row:hover {
    background: rgba(0, 212, 255, 0.05);
}

.tpo-row.value-area {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: #10b981;
}

.tpo-row.poc-level {
    background: rgba(0, 212, 255, 0.1);
    border-left-color: #00d4ff;
    border-left-width: 5px;
}

.tpo-price {
    width: 60px;
    text-align: right;
    padding-right: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.tpo-price.current-price-level {
    color: #ef4444;
    font-weight: 700;
}

.tpo-letters {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.tpo-letter {
    display: inline-block;
    width: 14px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border-radius: 2px;
    font-weight: 600;
}

.tpo-row.value-area .tpo-letter {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.tpo-row.poc-level .tpo-letter {
    background: rgba(0, 212, 255, 0.4);
    color: #fff;
}

.current-price-indicator {
    margin-left: 10px;
    color: #ef4444;
    font-size: 16px;
    font-weight: 700;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.tpo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-primary);
}

.stat-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-primary);
}

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

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-family: 'JetBrains Mono', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .tpo-profile-wrapper {
        padding: 1rem;
    }
    
    .tpo-legend {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tpo-letter {
        width: 12px;
        height: 14px;
        font-size: 10px;
        line-height: 14px;
    }
    
    .tpo-rows {
        font-size: 10px;
    }
}
