/* FolioCharts — Global Styles
   Complements Tailwind CDN utility classes. */

@import url('https://fonts.googleapis.com/css2?family=Neue+Haas+Grotesk+Display:wght@400;500;600;700&display=swap');

:root {
    --brand: rgb(79, 70, 229);
    --brand-hover: rgb(67, 56, 202);
    --bg-base: #111113;
    --bg-raised: #1a1a1f;
    --bg-elevated: #222228;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    --border-subtle: rgba(255,255,255,0.08);
    --border-medium: rgba(255,255,255,0.12);
}

/* ========== State Badges ========== */
.state-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.state-UPTREND { background: rgba(16,185,129,0.12); color: #34d399; }
.state-DOWNTREND { background: rgba(239,68,68,0.12); color: #f87171; }
.state-PARABOLIC { background: rgba(168,85,247,0.12); color: #c084fc; }
.state-FALLING_KNIFE { background: rgba(239,68,68,0.15); color: #f87171; }
.state-BOTTOMING_ATTEMPT { background: rgba(245,158,11,0.12); color: #fbbf24; }
.state-STABILIZED_BASE { background: rgba(59,130,246,0.12); color: #60a5fa; }
.state-BREAKOUT_REVERSAL { background: rgba(34,197,94,0.12); color: #4ade80; }
.state-CHOPPY_RANGE { background: rgba(234,179,8,0.12); color: #facc15; }
.state-VOLATILITY_EXPANSION { background: rgba(249,115,22,0.12); color: #fb923c; }

/* ========== Confidence Ring ========== */
.conf-high { border-color: #22c55e; }
.conf-mid { border-color: #eab308; }
.conf-low { border-color: #ef4444; }

/* ========== Ticker Card ========== */
.ticker-card {
    background: var(--bg-raised);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.ticker-card:hover {
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(79, 70, 229, 0.1);
}

/* ========== Scenario Tabs ========== */
.scenario-tabs-wrap {
    display: flex;
    background: var(--bg-raised);
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.scenario-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
}
.scenario-tab:not(:last-child) {
    border-right: 1px solid var(--border-subtle);
}
.scenario-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand);
    background: rgba(79, 70, 229, 0.06);
}
.scenario-tab:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
}
.scenario-panel {
    display: none;
    background: var(--bg-raised);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.scenario-panel.active { display: block; }

/* ========== Collapsible Details ========== */
.analysis-details { margin-bottom: 0.5rem; }
.analysis-details summary {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
}
.analysis-details summary:hover { color: var(--text-secondary); }
.analysis-details summary::after {
    content: '+';
    font-size: 1.1rem;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}
.analysis-details[open] summary::after { content: '\2212'; }

/* ========== Zone rows ========== */
.zone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}
.zone-row:last-child { border-bottom: none; }
.zone-row.highlight {
    background: rgba(16,185,129,0.06);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    margin: 0.15rem -0.6rem;
}

/* ========== CTA glow ========== */
.cta-glow {
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
    transition: all 0.25s;
}
.cta-glow:hover {
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.4);
}
