/* ═══════════════════════════════════════════════
   Gujarat Legal Fee Calculator — style.css
   ═══════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
    --ink: #0f1923;
    --ink-light: #3b4a5a;
    --parchment: #faf8f4;
    --cream: #f3f0ea;
    --gold: #c9943c;
    --gold-light: #e8c47a;
    --gold-pale: #fdf4e3;
    --teal: #1a6b6b;
    --teal-light: #2d9090;
    --red-alert: #c0392b;
    --red-pale: #fdf2f0;
    --border: #dcd6cc;
    --shadow-sm: 0 2px 8px rgba(15, 25, 35, 0.08);
    --shadow-md: 0 8px 32px rgba(15, 25, 35, 0.12);
    --shadow-lg: 0 20px 60px rgba(15, 25, 35, 0.16);
    --radius: 16px;
    --radius-sm: 10px;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Base ─── */
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--parchment);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Background Gradient ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 15% 10%, rgba(201, 148, 60, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 85% 80%, rgba(26, 107, 107, 0.07) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Page Wrapper ─── */
.page-wrap {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ══════════════════════════════════
   HOME BUTTON
══════════════════════════════════ */
.home-nav {
    padding: 20px 0 0;
    display: flex;
    justify-content: flex-start;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    color: var(--ink-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s ease;
}

.home-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.home-btn:hover {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    box-shadow: 0 4px 16px rgba(26, 107, 107, 0.28);
    transform: translateY(-1px);
}

.home-btn:hover svg {
    transform: scale(1.15);
}

/* ══════════════════════════════════
   HEADER
══════════════════════════════════ */
.site-header {
    text-align: center;
    padding: 52px 20px 36px;
}

.header-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--teal), #0e4a4a);
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(26, 107, 107, 0.35);
}

.header-emblem svg {
    width: 36px;
    height: 36px;
    fill: var(--gold-light);
}

.site-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.site-header h1 span {
    color: var(--teal);
}

.site-header p {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--ink-light);
    font-weight: 300;
}

/* ══════════════════════════════════
   MAIN TAB STRIP
══════════════════════════════════ */
.tab-strip {
    display: flex;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 5px;
    gap: 4px;
    max-width: 480px;
    margin: 0 auto 40px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: 44px;
    background: transparent;
    color: var(--ink-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tab-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tab-btn.active {
    background: var(--teal);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 107, 107, 0.3);
}

.tab-btn:not(.active):hover {
    background: var(--border);
    color: var(--ink);
}

/* ══════════════════════════════════
   TAB PANELS
══════════════════════════════════ */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ══════════════════════════════════
   CARD
══════════════════════════════════ */
.card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.card-subtitle {
    font-size: 0.82rem;
    color: var(--ink-light);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ══════════════════════════════════
   MODE TOGGLE (Same / Different)
══════════════════════════════════ */
.mode-toggle {
    display: flex;
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 24px;
    width: fit-content;
}

.mode-btn {
    padding: 8px 22px;
    border: none;
    border-radius: 44px;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-light);
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn.active {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 2px 10px rgba(201, 148, 60, 0.35);
}

/* ══════════════════════════════════
   FORM FIELDS
══════════════════════════════════ */
.field-wrap {
    margin-bottom: 20px;
}

.field-wrap label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.input-row {
    display: flex;
    gap: 16px;
}

.input-row .field-wrap {
    flex: 1;
}

.rupee-input {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--parchment);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rupee-input:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26, 107, 107, 0.1);
}

.rupee-symbol {
    padding: 0 14px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--teal);
    border-right: 1.5px solid var(--border);
    background: var(--cream);
    align-self: stretch;
    display: flex;
    align-items: center;
}

.rupee-input input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--ink);
    outline: none;
}

.rupee-input input::placeholder {
    color: #b0a898;
}

/* ══════════════════════════════════
   RESULT CARD
══════════════════════════════════ */
.result-card {
    background: var(--gold-pale);
    border: 1.5px solid #e8d9b8;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e8d9b8;
    transition: background 0.15s;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 0.88rem;
    color: var(--ink-light);
    font-weight: 500;
}

.result-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--teal);
    font-variant-numeric: tabular-nums;
}

.result-row.total-row {
    background: linear-gradient(90deg, rgba(26, 107, 107, 0.06), rgba(26, 107, 107, 0.1));
}

.result-row.total-row .result-label {
    font-weight: 700;
    color: var(--ink);
}

.result-row.total-row .result-value {
    font-size: 1.12rem;
    color: var(--ink);
}

.result-value.maxed {
    color: var(--red-alert) !important;
}

/* ══════════════════════════════════
   ALERT
══════════════════════════════════ */
.fee-alert {
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--red-pale);
    border: 1.5px solid #f0c5c0;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 0.84rem;
    color: var(--red-alert);
    font-weight: 500;
}

.fee-alert.show {
    display: flex;
}

/* ══════════════════════════════════
   INFO BANNER
══════════════════════════════════ */
.info-banner {
    background: linear-gradient(90deg, rgba(26, 107, 107, 0.06), rgba(26, 107, 107, 0.03));
    border: 1.5px solid rgba(26, 107, 107, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 0.83rem;
    color: var(--ink-light);
    line-height: 1.55;
    margin-bottom: 24px;
}

.info-banner strong {
    color: var(--teal);
}

/* ══════════════════════════════════
   DISCLAIMER BANNER
══════════════════════════════════ */
.disclaimer-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fffbf0;
    border: 1.5px solid #e8c96a;
    border-left: 5px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin-top: 28px;
}

.disclaimer-icon {
    flex-shrink: 0;
    color: var(--gold);
    margin-top: 1px;
}

.disclaimer-text {
    font-size: 0.85rem;
    color: var(--ink-light);
    line-height: 1.6;
}

.disclaimer-text strong {
    display: block;
    color: #8a6010;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 4px;
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
    margin-top: 52px;
    border-top: 1.5px solid var(--border);
    padding-top: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.footer-col h4 {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--ink);
}

.footer-col p,
.footer-col a {
    font-size: 0.8rem;
    color: var(--ink-light);
    line-height: 1.6;
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--teal);
}

.footer-bottom {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.75rem;
    color: #9a9080;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════
   ANIMATIONS
══════════════════════════════════ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel.active {
    animation: fadeUp 0.3s ease;
}

/* ══════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════ */
@media (max-width: 560px) {

    .card {
        padding: 20px 16px;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .site-footer {
        grid-template-columns: 1fr;
    }

    .tab-strip {
        max-width: 100%;
        border-radius: 14px;
        padding: 5px;
    }

    .tab-btn {
        flex-direction: row;
        padding: 12px 10px;
        font-size: 0.82rem;
        gap: 6px;
        border-radius: 10px;
        white-space: nowrap;
    }

    .tab-btn span {
        display: inline !important;
    }

    .mode-toggle {
        width: 100%;
    }

    .mode-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}