/* ═══════════════════════════════════════════
   step.css — Step-Up SIP Calculator styles
   Requires: calc-global.css
   v1.0
   ─────────────────────────────────────────
   Contains ONLY styles specific to the
   Step-Up SIP Calculator. Reuses all shared
   design tokens and components from
   calc-global.css without overriding them.
═══════════════════════════════════════════ */


/* ── Step-Up SIP specific CSS variables ── */
:root {
    --sip-blue:        #2563EB;
    --sip-blue-soft:   #DBEAFE;
    --stepup-indigo:   #4F46E5;
    --stepup-indigo-soft: #E0E7FF;
    --stepup-violet:   #7C3AED;
}


/* ═══════════════════════════════════════════
   SIP-ONLY COLOUR UTILITIES
═══════════════════════════════════════════ */

.c-sip  { color: var(--sip-blue); }
.c-indigo { color: var(--stepup-indigo); }

/* Hero stat amber alias */
.hs-value.amber { color: #FDE68A; }

/* Negative real return value */
.r-val.negative { color: var(--danger) !important; }


/* ═══════════════════════════════════════════
   ESTIMATE LABEL PILL
═══════════════════════════════════════════ */

.est-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: .08rem .4rem;
    border-radius: 20px;
    background: #FEF9C3;
    border: 1px solid #FDE047;
    color: #854D0E;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .05em;
    vertical-align: middle;
    margin-left: 4px;
}


/* ═══════════════════════════════════════════
   RATE WARNING BADGE
═══════════════════════════════════════════ */

#rateWarningBadge {
    font-size: .69rem;
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: .3rem .6rem;
    margin-top: 5px;
    font-weight: 600;
    line-height: 1.4;
}


/* ═══════════════════════════════════════════
   FUND CATEGORY CHIP GRID
═══════════════════════════════════════════ */

.bank-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: .9rem;
}

.bank-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: .26rem .75rem;
    border-radius: 30px;
    border: 1.5px solid var(--slate-line);
    background: var(--white);
    font-size: .73rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all .18s var(--ease);
    user-select: none;
}
.bank-chip:hover {
    border-color: var(--sip-blue);
    color: var(--sip-blue);
}
.bank-chip.active {
    background: var(--sip-blue-soft);
    border-color: var(--sip-blue);
    color: #1d4ed8;
}
.bank-chip .chip-rate {
    font-size: .68rem;
    color: var(--emerald);
    font-weight: 700;
}


/* ═══════════════════════════════════════════
   STEP-UP BADGE (inline "ON" pill in toggle)
═══════════════════════════════════════════ */

.stepup-badge {
    display: inline-flex;
    align-items: center;
    padding: .1rem .45rem;
    border-radius: 20px;
    background: var(--emerald);
    color: var(--white);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .06em;
    margin-left: 6px;
    vertical-align: middle;
}


/* ═══════════════════════════════════════════
   STEP-UP PREVIEW NOTE
═══════════════════════════════════════════ */

.stepup-preview-note {
    margin-top: 6px;
    background: var(--stepup-indigo-soft);
    border: 1px solid #A5B4FC;
    border-radius: 8px;
    padding: .35rem .7rem;
    font-size: .69rem;
    color: #312e81;
    font-weight: 500;
    display: none;
    line-height: 1.5;
}
.stepup-preview-note.show { display: block; }


/* ═══════════════════════════════════════════
   HERO STEP-UP BANNER
═══════════════════════════════════════════ */

.hero-stepup-banner {
    margin-top: 10px;
    background: rgba(79,70,229,.14);
    border: 1px solid rgba(79,70,229,.28);
    border-radius: 12px;
    padding: .55rem .85rem;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
}
.hero-stepup-banner.show { display: flex; }
.hero-stepup-banner i    { color: #A5B4FC; }

.stepup-amt {
    color: #A5B4FC;
    font-family: var(--font-mono);
}


/* ═══════════════════════════════════════════
   HERO INFLATION BANNER
═══════════════════════════════════════════ */

.hero-inflation-banner {
    margin-top: 10px;
    background: rgba(79,70,229,.12);
    border: 1px solid rgba(79,70,229,.22);
    border-radius: 12px;
    padding: .55rem .85rem;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
}
.hero-inflation-banner.show { display: flex; }
.hero-inflation-banner i    { color: #A5B4FC; }

.inflation-amt {
    color: #A5B4FC;
    font-family: var(--font-mono);
}

.hero-inflation-banner.negative-real {
    background: rgba(220, 38, 38, .1);
    border-color: rgba(220, 38, 38, .25);
}
.hero-inflation-banner.negative-real i { color: #FCA5A5; }
.hero-inflation-banner.negative-real .inflation-amt { color: #FCA5A5; }


/* ═══════════════════════════════════════════
   EMPTY FIELD PROMPT
═══════════════════════════════════════════ */

.field-empty-prompt {
    font-size: .7rem;
    color: var(--danger);
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 4px;
    background: var(--danger-soft);
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: .3rem .6rem;
}
.field-empty-prompt.show { display: flex; }


/* ═══════════════════════════════════════════
   RESULT ESTIMATE NOTE
═══════════════════════════════════════════ */

.result-estimate-note {
    font-size: .65rem;
    color: var(--slate);
    font-style: italic;
    text-align: right;
    margin-bottom: .4rem;
    opacity: .75;
}


/* ═══════════════════════════════════════════
   STEP-UP vs FLAT SIP — HERO GRID
═══════════════════════════════════════════ */

.vs-hero-grid {
    display: grid;
    grid-template-columns: 1fr 48px 1fr;
    gap: 0;
    align-items: center;
    margin-bottom: .5rem;
}

.vs-hero-card {
    border-radius: var(--r-lg);
    padding: 1rem 1.1rem;
    border: 2px solid transparent;
    text-align: center;
    transition: box-shadow .2s, transform .18s var(--ease-spring);
}
.vs-hero-card:hover {
    box-shadow: var(--sh-2);
    transform: translateY(-2px);
}

.vs-hero-card.vs-stepup {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: var(--emerald);
}
.vs-hero-card.vs-flat {
    background: var(--slate-light);
    border-color: var(--slate-line);
}

.vs-card-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--slate);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: .5rem;
}
.vs-hero-card.vs-stepup .vs-card-label { color: var(--emerald); }
.vs-hero-card.vs-stepup .vs-card-label i { color: var(--emerald); }

.vs-card-amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--navy);
    font-family: var(--font-mono);
    letter-spacing: -.03em;
    line-height: 1.2;
    margin-bottom: .3rem;
}
.vs-hero-card.vs-stepup .vs-card-amount { color: var(--emerald); }

.vs-card-sub {
    font-size: .69rem;
    color: var(--slate);
    font-weight: 500;
    margin-bottom: .2rem;
}
.vs-card-gain {
    font-size: .72rem;
    font-weight: 700;
    color: var(--navy);
    font-family: var(--font-mono);
}
.vs-hero-card.vs-stepup .vs-card-gain { color: #065f46; }

.vs-divider-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.vs-vs-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-size: .65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vs-diff-label {
    font-size: .62rem;
    font-weight: 700;
    color: var(--emerald);
    text-align: center;
    max-width: 60px;
    line-height: 1.3;
    font-family: var(--font-mono);
}


/* ═══════════════════════════════════════════
   VS BARS (step-up vs flat comparison chart)
═══════════════════════════════════════════ */

.vs-bars {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    overflow: hidden;
    box-sizing: border-box;
}


/* ═══════════════════════════════════════════
   GOAL PLANNER GRID
═══════════════════════════════════════════ */

.goal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: .5rem;
}

.goal-card {
    background: var(--slate-light);
    border-radius: var(--r-lg);
    border: 2px solid var(--navy);
    overflow: hidden;
    padding: .9rem;
}

.goal-card-title {
    font-size: .75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--navy);
    margin: -.9rem -.9rem .85rem;
    padding: .55rem .9rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.goal-card-title i { color: var(--amber); }

.goal-result-card {
    background: var(--slate-light);
    border-radius: var(--r-lg);
    border: 2px solid var(--emerald);
    overflow: hidden;
    padding: .9rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.goal-result-title {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--emerald);
}

.goal-result-main {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    font-family: var(--font-mono);
    line-height: 1.2;
}

.goal-result-detail {
    font-size: .75rem;
    color: var(--slate);
    line-height: 1.5;
}
.goal-result-detail strong { color: var(--navy); }

.goal-result-breakdown {
    margin-top: .25rem;
    border-top: 1px solid var(--slate-line);
    padding-top: .5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.grb-row {
    display: flex;
    justify-content: space-between;
    font-size: .73rem;
    color: var(--slate);
    font-weight: 500;
}
.grb-row span:last-child {
    font-weight: 700;
    color: var(--navy);
    font-family: var(--font-mono);
}
.grb-row.highlight {
    background: var(--emerald-soft);
    border-radius: 7px;
    padding: .3rem .5rem;
    color: #065f46;
    font-weight: 700;
}
.grb-row.highlight span:last-child { color: var(--emerald); }


/* ═══════════════════════════════════════════
   INSIGHT CARD — TEAL / INDIGO VARIANT
═══════════════════════════════════════════ */

.insight-card.teal  { border-left-color: var(--sip-blue); }
.insight-card.indigo { border-left-color: var(--stepup-indigo); }

.insight-card .insight-detail { color: #374151; }


/* ═══════════════════════════════════════════
   SIP LINE CHART — OVERRIDE GLOBAL BAR DEFAULTS
═══════════════════════════════════════════ */

#yrBars {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    overflow: hidden;
    box-sizing: border-box;
}


/* ═══════════════════════════════════════════
   YEAR DETAIL PANEL — 4-COLUMN OVERRIDE
   (adds "SIP This Year" cell)
═══════════════════════════════════════════ */

.ydp-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

@media (max-width: 600px) {
    .ydp-grid-4 { grid-template-columns: 1fr 1fr; }
}


/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

@media (max-width: 700px) {
    .goal-grid     { grid-template-columns: 1fr; }
    .vs-hero-grid  { grid-template-columns: 1fr; gap: 8px; }
    .vs-divider-col { flex-direction: row; justify-content: center; }
}

@media (max-width: 480px) {
    .lcb-grid { grid-template-columns: 1fr; }
}