/* ============================================
   SUPERGRAPH TAB STYLES - Theme Compatible
   ============================================ */

   .supergraph-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Control Panel */
.supergraph-control-panel {
    flex: 0.8;
    min-width: 280px;
    background: var(--theme-bgControl, #f8fafd);
    border-radius: 1.2rem;
    padding: 1rem;
    border: 1px solid var(--theme-borderLight, #eef2f8);
    height: fit-content;
}

/* Chart Container */
.supergraph-chart-container {
    flex: 2.5;
    min-width: 400px;
    background: var(--theme-bgCard, white);
    border-radius: 1.2rem;
    padding: 1rem;
    box-shadow: var(--theme-shadow, 0 4px 12px rgba(0, 0, 0, 0.05));
}

/* Control Groups */
.supergraph-control-group {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--theme-borderLight, #e2edf2);
    padding-bottom: 0.8rem;
}

.supergraph-control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.supergraph-control-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--theme-accent, #ff9f4a);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Compact Legend */
.supergraph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.supergraph-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: var(--theme-bgPrimary, white);
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--theme-borderLight, #e2edf2);
    color: var(--theme-textPrimary, #333);
}

.supergraph-legend-item:hover {
    background: var(--theme-accent, rgba(255, 159, 74, 0.2));
    border-color: var(--theme-accent, #ff9f4a);
}

.supergraph-legend-item.hidden {
    opacity: 0.5;
    background: var(--theme-bgTertiary, #f0f4fa);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 10px;
}

/* Range Selector */
.supergraph-range-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.supergraph-range-selector select {
    background: var(--theme-bgPrimary, white);
    border: 1px solid var(--theme-borderLight, #e2edf2);
    border-radius: 2rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--theme-textPrimary, #333);
}

.supergraph-area-ratio {
    background: linear-gradient(135deg, var(--theme-primaryDark, #1a3a4f), var(--theme-primary, #1f5068));
    color: var(--theme-textInverse, white);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Dual Slider */
.supergraph-dual-slider-container {
    position: relative;
    height: 40px;
    margin: 0.5rem 0;
}

.supergraph-dual-slider-track {
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--theme-borderLight, #e2edf2);
    border-radius: 2px;
}

.supergraph-dual-slider-range {
    position: absolute;
    top: 18px;
    height: 4px;
    background: var(--theme-accent, #ff9f4a);
    border-radius: 2px;
}

.supergraph-dual-slider-input {
    position: absolute;
    top: 8px;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    background: transparent;
}

.supergraph-dual-slider-input::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--theme-accent, #ff9f4a);
    border: 2px solid var(--theme-textInverse, white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.supergraph-dual-range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.supergraph-lower-badge {
    color: var(--theme-success, #44ff44);
    background: var(--theme-primaryDark, #1a3a4f);
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
}

.supergraph-upper-badge {
    color: var(--theme-danger, #ff4444);
    background: var(--theme-primaryDark, #1a3a4f);
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
}

/* Zoom Controls */
.supergraph-zoom-item {
    margin-bottom: 0.6rem;
}

.supergraph-zoom-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--theme-textPrimary, #333);
}

.supergraph-zoom-slider {
    width: 100%;
    accent-color: var(--theme-accent, #ff9f4a);
}

.supergraph-zoom-info {
    background: var(--theme-bgTertiary, #eef2fa);
    border-radius: 1rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.6rem;
    font-family: monospace;
    text-align: center;
    margin-top: 0.5rem;
    color: var(--theme-textSecondary, #6c8eaa);
}

.supergraph-reset-btn {
    width: 100%;
    background: var(--theme-accent, #ff9f4a);
    color: var(--theme-primaryDark, #1a3a4f);
    border: none;
    padding: 0.3rem;
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: 0.2s;
}

.supergraph-reset-btn:hover {
    background: var(--theme-accentDark, #ffb86b);
}

/* Canvas Container */
.supergraph-canvas-container {
    position: relative;
    min-height: 450px;
}

#superGraphCanvas {
    max-height: 450px;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .supergraph-wrapper {
        flex-direction: column;
    }
    
    .supergraph-control-panel {
        min-width: auto;
    }
    
    .supergraph-chart-container {
        min-width: auto;
    }
}