/* ==========================================================================
   ROBINHOOD / WEBULL INSPIRED INTERACTIVE EQUITY CURVE & SCRUBBER
   High-end design with full Light & Dark theme parity
   ========================================================================== */

.rh-equity-card {
    position: relative;
    background: var(--rh-card-bg, rgba(15, 23, 42, 0.75));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--rh-card-border, rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    padding: 18px 20px 14px 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Light Theme Overrides */
[data-theme="light"] .rh-equity-card,
body.light-theme .rh-equity-card {
    --rh-card-bg: rgba(255, 255, 255, 0.92);
    --rh-card-border: rgba(0, 0, 0, 0.08);
    --rh-label-color: #64748b;
    --rh-val-color: #0f172a;
    --rh-pill-bg: rgba(0, 0, 0, 0.04);
    --rh-pill-border: rgba(0, 0, 0, 0.08);
    --rh-pill-color: #64748b;
    --rh-pill-active-bg: rgba(16, 185, 129, 0.12);
    --rh-pill-active-border: #10b981;
    --rh-pill-active-color: #059669;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Dark Theme Overrides (Default) */
[data-theme="dark"] .rh-equity-card,
body:not(.light-theme) .rh-equity-card {
    --rh-card-bg: rgba(15, 23, 42, 0.78);
    --rh-card-border: rgba(255, 255, 255, 0.1);
    --rh-label-color: #94a3b8;
    --rh-val-color: #f8fafc;
    --rh-pill-bg: rgba(255, 255, 255, 0.04);
    --rh-pill-border: rgba(255, 255, 255, 0.08);
    --rh-pill-color: #94a3b8;
    --rh-pill-active-bg: rgba(16, 185, 129, 0.2);
    --rh-pill-active-border: #10b981;
    --rh-pill-active-color: #34d399;
}

.rh-equity-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.rh-equity-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--rh-label-color, #94a3b8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rh-equity-label i {
    width: 14px;
    height: 14px;
    color: #10b981;
}

.rh-equity-val {
    font-size: 34px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace, -apple-system, sans-serif;
    color: var(--rh-val-color, #f8fafc);
    letter-spacing: -0.6px;
    line-height: 1.1;
    transition: color 0.15s ease;
}

.rh-equity-delta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
    flex-wrap: wrap;
}

.rh-equity-delta {
    font-family: 'JetBrains Mono', monospace;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

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

.rh-equity-delta.negative {
    color: #f43f5e;
}

.rh-equity-period {
    color: var(--rh-label-color, #94a3b8);
    font-weight: 600;
}

.rh-equity-scrub-time {
    background: rgba(148, 163, 184, 0.14);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--rh-label-color, #cbd5e1);
    font-family: 'JetBrains Mono', monospace;
}

/* Canvas Area */
.rh-canvas-container {
    position: relative;
    width: 100%;
    height: 180px;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.rh-canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Range Selector Pills */
.rh-range-selector {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 14px;
    border-top: 1px solid var(--rh-card-border, rgba(255, 255, 255, 0.08));
    padding-top: 12px;
}

.rh-range-btn {
    flex: 1;
    max-width: 68px;
    min-height: 32px;
    background: var(--rh-pill-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--rh-pill-border, rgba(255, 255, 255, 0.08));
    border-radius: 20px;
    color: var(--rh-pill-color, #94a3b8);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.rh-range-btn:hover {
    background: var(--rh-pill-active-bg, rgba(16, 185, 129, 0.15));
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.rh-range-btn.active {
    background: var(--rh-pill-active-bg, rgba(16, 185, 129, 0.2));
    border-color: var(--rh-pill-active-border, #10b981);
    color: var(--rh-pill-active-color, #34d399);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

@media (max-width: 600px) {
    .rh-equity-card {
        padding: 14px 16px 12px 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }
    .rh-equity-val {
        font-size: 28px;
    }
    .rh-canvas-container {
        height: 150px;
    }
    .rh-range-btn {
        min-height: 30px;
        font-size: 11px;
    }
}
