/* ═══════════════════════════════════════════
   it.css  v2.1
   Income Tax Calculator – specific styles
   Extends calc-global.css
   Audit fixes: HRA box style, auto-ded note,
   std-deduction slider max aligned to 50K
═══════════════════════════════════════════ */

/* ── Additional color tokens ── */
:root {
    --c-slate-txt:  var(--slate);
    --emerald-400:  #34D399;
    --emerald-600:  #059669;
    --blue-50:      #EFF6FF;
    --blue-600:     #2563EB;
    --blue-700:     #1D4ED8;
    --amber-50:     #FFFBEB;
    --amber-500:    #F59E0B;
    --amber-600:    #D97706;
    --navy-50:      #EBF0F7;
    --navy-600:     #1E3A5F;
    --navy-700:     #0D2545;
    --navy-800:     #091C36;
    --white:        #FFFFFF;
    --gray-100:     #F3F4F6;
    --gray-200:     #E5E7EB;
    --gray-300:     #D1D5DB;
    --gray-600:     #6B7280;
    --gray-700:     #4B5563;
}

/* ── Sub-heading for page header ── */
.page-header-sub {
    font-size: .8rem;
    color: var(--slate);
    margin-top: .3rem;
}

/* ══════════════════════════════
   REGIME TOGGLE — MODERN SEGMENTED PILL
══════════════════════════════ */
.regime-toggle-wrap {
    display: flex;
    background: #F3F5F8;
    border-radius: 999px;
    padding: 4px;
    gap: 3px;
    position: relative;
    margin-bottom: 16px;
    border: 1px solid rgba(13,37,69,.08);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,.7),
        inset 0 -1px 2px rgba(13,37,69,.04);
}

.regime-toggle-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: .55rem .95rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition:
        background .25s ease,
        transform .18s ease,
        box-shadow .25s ease,
        color .2s ease;
    user-select: none;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.regime-toggle-card:focus-visible { outline: none; }
.regime-toggle-card:active        { transform: scale(.98); }
.regime-toggle-card:hover         { background: rgba(255,255,255,.55); }

.regime-toggle-card[aria-pressed="true"] {
    background: linear-gradient(180deg, #17365D 0%, #0D2545 100%);
    box-shadow:
        0 3px 10px rgba(13,37,69,.18),
        0 1px 2px rgba(0,0,0,.08);
    color: #fff;
    transform: translateY(-1px);
}

.rtc-indicator { display: none; }

.rtc-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 0;
}

.rtc-title {
    font-size: .8rem;
    font-weight: 700;
    color: #475569;
    line-height: 1.15;
    letter-spacing: -.01em;
    transition: color .25s ease;
}
.regime-toggle-card:hover .rtc-title           { color: var(--ink); }
.regime-toggle-card[aria-pressed="true"] .rtc-title { color: #fff; }

.rtc-sub {
    font-size: .6rem;
    color: #64748B;
    font-weight: 500;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    transition: color .25s ease;
}
.regime-toggle-card[aria-pressed="true"] .rtc-sub { color: rgba(255,255,255,.82); }

.rtc-badge          { display: none !important; }
.ded-toggle-hidden  { display: none !important; }

@media(max-width:480px) {
    .regime-toggle-card { padding: .55rem .65rem; gap: 5px; }
    .rtc-title          { font-size: .74rem; }
    .rtc-sub            { font-size: .58rem; white-space: normal; }
    .regime-toggle-wrap { gap: 2px; padding: 4px; }
}

/* ══════════════════════════════
   HERO OVERRIDES FOR IT
══════════════════════════════ */
.it-hero { margin-bottom: 0; border-radius: var(--r-xl); }

/* ══════════════════════════════
   REBATE NOTICE
══════════════════════════════ */
.rebate-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: .9rem;
    padding: .7rem .9rem;
    background: var(--emerald-soft);
    border: 1px solid #6EE7B7;
    border-radius: var(--r-md);
    font-size: .78rem;
    font-weight: 600;
    color: #065F46;
}
.rebate-notice i { color: var(--emerald); font-size: .9rem; flex-shrink: 0; }

/* ══════════════════════════════
   DEDUCTION NOTES
══════════════════════════════ */
.ded-note {
    font-size: .68rem;
    color: var(--slate);
    margin-top: 4px;
    line-height: 1.4;
}

/* ══════════════════════════════
   HRA ACCORDION TOGGLE
══════════════════════════════ */
.hra-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .85rem;
    margin-bottom: 0;
    background: var(--slate-light);
    border-radius: var(--r-md);
    cursor: pointer;
    user-select: none;
    border: 1px solid var(--slate-line);
    transition: background .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.hra-toggle:hover { background: var(--navy-light); }

.hra-toggle-lbl {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--navy);
}
.hra-toggle-lbl i { color: var(--navy); font-size: .8rem; }

.hra-toggle-right {
    display: flex;
    align-items: center;
    gap: .1rem;
    flex-shrink: 0;
}

.hra-chevron {
    font-size: .75rem;
    color: var(--slate);
    transition: transform .22s ease;
}
.hra-chevron.open { transform: rotate(180deg); }

/* Inner padding when open — matches fees-fields pattern */
.hra-fields-inner {
    padding: .85rem .1rem .1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* hra-fields: simple display toggle, no height animation
   avoids clipping inside a nested accordion */
.hra-fields {
    display: none;
    overflow: visible;
}
.hra-fields.open {
    display: block;
}

/* ══════════════════════════════
   AUTO DEDUCTION NOTICE (80TTA/80TTB)
══════════════════════════════ */
.auto-ded-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: .6rem;
    padding: .55rem .75rem;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--r-md);
    font-size: .71rem;
    color: #1E40AF;
    font-weight: 500;
    line-height: 1.45;
}
.auto-ded-note i { color: #3B82F6; margin-top: .05rem; flex-shrink: 0; }

/* ══════════════════════════════
   TAX SLAB BREAKDOWN TABLE
══════════════════════════════ */
.slab-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.slab-table {
    width: 100%;
    min-width: 420px;
    border-collapse: collapse;
    font-size: .79rem;
}

.slab-table thead th {
    background: var(--slate-light);
    color: var(--slate);
    font-weight: 700;
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .7rem 1rem;
    text-align: right;
    white-space: nowrap;
}
.slab-table thead th:first-child { text-align: left; }

.slab-table tbody tr          { border-bottom: 1px solid var(--slate-line); }
.slab-table tbody tr:last-child { border-bottom: none; }
.slab-table tbody tr:hover    { background: var(--slate-light); }

.slab-table tbody tr.slab-active {
    background: var(--amber-soft);
    font-weight: 700;
}
.slab-table tbody tr.slab-active td { color: #92400E; }
.slab-table tbody tr.slab-zero td   { color: #94A3B8; }

.slab-table td {
    padding: .6rem 1rem;
    text-align: right;
    color: var(--slate);
    font-family: var(--font-mono);
    font-size: .77rem;
}
.slab-table td:first-child {
    text-align: left;
    color: var(--ink);
    font-weight: 600;
    font-family: var(--font-body);
}

.slab-table tfoot td {
    padding: .7rem 1rem;
    text-align: right;
    font-weight: 800;
    font-size: .82rem;
    color: var(--navy);
    font-family: var(--font-mono);
    border-top: 2px solid var(--slate-line);
    background: var(--navy-light);
}
.slab-table tfoot td:first-child {
    text-align: left;
    font-family: var(--font-body);
}

/* ══════════════════════════════
   REGIME COMPARISON GRID
══════════════════════════════ */
.regime-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}

.rc-card {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 2px solid transparent;
    transition: box-shadow .2s var(--ease), transform .15s var(--ease);
}
.rc-card.rc-new    { border-color: var(--navy); }
.rc-card.rc-old    { border-color: var(--amber); }
.rc-card.rc-winner {
    box-shadow: 0 0 0 3px rgba(5,150,105,.3);
    border-color: var(--emerald);
}

.rc-head {
    padding: .55rem .9rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}
.rc-card.rc-new .rc-head    { background: var(--navy); }
.rc-card.rc-old .rc-head    { background: var(--amber); color: var(--ink); }
.rc-card.rc-winner .rc-head { background: var(--emerald); }

.rc-badge {
    font-size: .62rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 20px;
    background: rgba(255,255,255,.2);
    white-space: nowrap;
}
.rc-card.rc-old .rc-badge { background: rgba(0,0,0,.1); }

.rc-body { padding: .85rem .9rem; background: var(--slate-light); }

.rc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem 0;
    border-bottom: 1px solid var(--slate-line);
    font-size: .75rem;
}
.rc-row:last-child    { border-bottom: none; }
.rc-row-lbl           { color: var(--slate); font-weight: 500; }
.rc-row-val           { font-weight: 700; color: var(--navy); font-family: var(--font-mono); }
.rc-row-val.rc-tax-val { color: var(--amber); font-size: .88rem; }
.rc-row-val.rc-zero   { color: var(--emerald); }

/* Recommendation box */
.regime-recommendation {
    margin-top: .5rem;
    padding: .85rem 1rem;
    border-radius: var(--r-md);
    background: var(--emerald-soft);
    border: 1px solid #A7F3D0;
    font-size: .8rem;
    font-weight: 600;
    color: #065F46;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.regime-recommendation i { color: var(--emerald); flex-shrink: 0; margin-top: 1px; }

/* ══════════════════════════════
   SEO CONTENT SECTION
══════════════════════════════ */
.it-seo-section {
    margin-top: 40px;
    padding-bottom: 32px;
}

.it-seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.it-seo-card {
    background: var(--white);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-1);
    border: 1px solid rgba(13,37,69,.06);
    padding: 1.4rem 1.5rem;
}

.it-seo-card h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .65rem;
    line-height: 1.3;
}

.it-seo-card p {
    font-size: .78rem;
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: .85rem;
}

.it-seo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .76rem;
}
.it-seo-table th {
    background: var(--navy-light);
    color: var(--navy);
    font-weight: 700;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .5rem .75rem;
    text-align: left;
}
.it-seo-table td {
    padding: .45rem .75rem;
    border-bottom: 1px solid var(--slate-line);
    color: var(--ink);
    font-family: var(--font-mono);
    text-align: left;
}
.it-seo-table tr:last-child td { border-bottom: none; }
.it-seo-table tr:hover td      { background: var(--slate-light); }

/* ══════════════════════════════
   RESULT ITEM COLOUR OVERRIDES
══════════════════════════════ */
.c-slate { color: var(--slate); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media(max-width:700px) {
    .regime-compare-grid { grid-template-columns: 1fr; }
    .it-seo-grid         { grid-template-columns: 1fr; }
    .regime-selector     { border-radius: var(--r-lg) var(--r-lg) 0 0; }
    .rt-sub              { display: none; }
}

@media(max-width:480px) {
    .regime-tab   { padding: .7rem .5rem; }
    .rt-label     { font-size: .78rem; }
    .slab-table   { min-width: 340px; }
}

@media(min-width:768px) {
    .regime-toggle-wrap   { max-width: 430px; padding: 3px; }
    .regime-toggle-card   { padding: .48rem .85rem; }
    .rtc-title            { font-size: .78rem; }
    .rtc-sub              { font-size: .58rem; }
}