/* ==========================================================================
   Fee voucher page and the three-copy printable challan.
   The document itself stays black on white in both themes so it prints and
   photocopies cleanly.
   ========================================================================== */

.fee-page__head {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px;
    padding: 18px 20px;
    background: var(--tint);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.fee-page__head h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.fee-page__head p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
}

.fee-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fee-page__note {
    margin-top: 18px;
    padding: 16px 18px;
    background: var(--tint);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--muted);
}

.fee-page__note p {
    margin: 0 0 8px;
}

.fee-page__note p:last-child {
    margin-bottom: 0;
}

.fee-page__note i {
    color: var(--sky-deep);
    margin-right: 6px;
}

/* ---------------------------------------------------------------- lookup form */

.fee-lookup {
    margin: 24px 0 30px;
    padding: 26px 28px;
    background: linear-gradient(120deg, var(--navy), var(--navy-2));
    border-radius: 20px;
    color: #fff;
    box-shadow: var(--shadow);
}

.fee-lookup__head {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.fee-lookup__icon {
    flex: none;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .12);
    color: var(--gold);
    font-size: 1.4rem;
}

.fee-lookup__head h2 {
    margin: 0 0 4px;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #fff;
}

.fee-lookup__head p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: .94rem;
}

.fee-period {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
}

.fee-period span {
    display: block;
    color: rgba(255, 255, 255, .62);
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.fee-period strong {
    display: block;
    color: #fff;
    font-size: 1rem;
}

.fee-lookup__form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: .9rem;
}

.fee-lookup__row {
    display: flex;
    gap: 10px;
}

.fee-lookup__row input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    color: #111;
    font-size: 1rem;
}

.fee-lookup__row input:focus {
    outline: 3px solid rgba(240, 190, 80, .45);
    outline-offset: 1px;
}

.fee-lookup__row .btn-gold {
    white-space: nowrap;
}

.fee-lookup__privacy {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: .8rem;
}

.fee-lookup__privacy i {
    color: var(--gold);
    margin-right: 5px;
}

.fee-lookup .alert {
    color: #3d2b00;
}

/* ---------------------------------------------------------------- the challan */

.fee-print-area {
    overflow-x: auto;
    padding-bottom: 4px;
}

.fee-copy {
    box-sizing: border-box;
    width: 100%;
    max-width: 210mm;
    min-width: 680px;
    margin: 0 auto 20px;
    padding: 16px 18px;
    background: #fff;
    color: #111;
    border: 1px solid #9aa8b8;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(11, 31, 58, .08);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.3;
}

.fee-copy:last-child {
    margin-bottom: 0;
}

.fee-copy__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #111;
}

.fee-copy__school {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fee-copy__logo {
    width: 42px;
    height: auto;
    flex: none;
}

.fee-copy__school h2 {
    margin: 0;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.2;
}

.fee-copy__school p {
    margin: 2px 0 0;
    color: #444;
    font-size: 10px;
}

.fee-copy__badge {
    flex: none;
    padding: 4px 10px;
    border: 1px solid #111;
    border-radius: 3px;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fee-copy__title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.fee-copy__title strong {
    letter-spacing: 0;
    text-transform: none;
}

.fee-copy table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.fee-copy th,
.fee-copy td {
    border: 1px solid #8f9dab;
    padding: 3px 5px;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.fee-copy th {
    background: #f1f4f8;
    font-weight: 700;
    text-align: left;
}

.fee-copy__meta th {
    width: 11%;
    font-size: 9.5px;
    white-space: nowrap;
}

.fee-copy__meta td {
    width: 22%;
    font-size: 11px;
}

.fee-copy__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid #8f9dab;
    border-left: 1px solid #8f9dab;
}

.fee-copy__cell {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2px;
    min-height: 34px;
    padding: 3px 4px;
    border-right: 1px solid #8f9dab;
    border-bottom: 1px solid #8f9dab;
}

.fee-copy__cell-label {
    font-size: 9px;
    font-weight: 700;
    line-height: 1.15;
}

.fee-copy__cell-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fee-copy__cell--deduct .fee-copy__cell-amount {
    color: #7a1f1f;
}

.fee-copy__totals th {
    width: 14%;
    font-size: 9.5px;
}

.fee-copy__totals td {
    width: 19%;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fee-copy__total {
    font-weight: 700;
    background: #fff8e6;
}

.fee-copy__deduct {
    color: #7a1f1f;
}

.fee-copy__included {
    text-align: left !important;
    font-size: 9px;
    color: #444;
    background: #fafafa;
}

.fee-copy__words {
    margin: 6px 0 5px;
    padding: 5px 6px;
    border: 1px dashed #8f9dab;
    font-size: 10px;
}

.fee-copy__bank {
    margin-top: 5px;
    font-size: 9px;
}

.fee-copy__bank strong {
    display: block;
    margin-bottom: 2px;
}

.fee-copy__branches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px 14px;
}

.fee-copy__sign {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding-top: 4px;
    font-size: 9px;
}

.fee-copy__sign span {
    flex: 1 1 0;
    border-top: 1px solid #111;
    padding-top: 3px;
}

.fee-copy__sign span:last-child {
    text-align: right;
}

.fee-copy--bank .fee-copy__badge {
    background: #0b4f6c;
    border-color: #0b4f6c;
}

.fee-copy--office .fee-copy__badge {
    background: #5a3e00;
    border-color: #5a3e00;
}

.fee-copy--parent .fee-copy__badge {
    background: #1f5b35;
    border-color: #1f5b35;
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 767.98px) {
    .fee-lookup {
        padding: 20px 18px;
    }

    .fee-lookup__head {
        gap: 12px;
    }

    .fee-lookup__icon {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }

    .fee-lookup__row {
        flex-direction: column;
    }

    .fee-lookup__row .btn-gold {
        width: 100%;
        text-align: center;
    }

    .fee-period {
        grid-template-columns: 1fr;
    }

    .fee-page__actions {
        width: 100%;
    }

    .fee-page__actions .btn-gold,
    .fee-page__actions .btn-outline-navy {
        flex: 1 1 auto;
        text-align: center;
    }

    .fee-copy {
        min-width: 620px;
        padding: 12px;
        font-size: 11px;
    }

    .fee-copy__school h2 {
        font-size: 13px;
    }

    .fee-copy__logo {
        width: 34px;
    }
}

/* ---------------------------------------------------------------- print */

@media print {
    @page {
        size: A4 portrait;
        margin: 6mm;
    }

    html,
    body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .notice-bar,
    .site-nav,
    .page-banner,
    .site-footer,
    .fab-stack,
    .side-card,
    .skip-link,
    #lightbox,
    .fee-page__head,
    .fee-page__note,
    .fee-lookup,
    .cms-top,
    .cms-side,
    .cms-title,
    .print-bar,
    .no-print,
    .alert {
        display: none !important;
    }

    .content-wrap,
    .content-wrap .container,
    .content-wrap .row,
    .content-wrap [class*="col-"],
    .cms-main,
    .cms-content,
    .cms-shell,
    .cms-bare-main {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .article {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .fee-print-area {
        overflow: visible !important;
        padding: 0 !important;
    }

    .reveal,
    .reveal.reveal-init {
        opacity: 1 !important;
        transform: none !important;
    }

    .fee-copy {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 0 3mm !important;
        padding: 2.5mm 3mm !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        font-size: 8pt;
        line-height: 1.18;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .fee-copy:last-child {
        margin-bottom: 0 !important;
    }

    .fee-copy__head {
        padding-bottom: 1.2mm;
        border-bottom: 1.2pt solid #000;
    }

    .fee-copy__logo {
        width: 11mm;
    }

    .fee-copy__school h2 {
        font-size: 9pt;
    }

    .fee-copy__school p {
        font-size: 7pt;
    }

    .fee-copy__badge {
        padding: .6mm 2mm;
        border: 1pt solid #000 !important;
        background: #fff !important;
        color: #000 !important;
        font-size: 7pt;
    }

    .fee-copy__title {
        padding: .8mm 0;
        font-size: 7.5pt;
    }

    .fee-copy th,
    .fee-copy td {
        border: .6pt solid #000;
        padding: .5mm .8mm;
    }

    .fee-copy th {
        background: #eee !important;
    }

    .fee-copy__meta th,
    .fee-copy__meta td,
    .fee-copy__totals th,
    .fee-copy__totals td {
        font-size: 7.5pt;
    }

    .fee-copy__grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
        border-top: .6pt solid #000;
        border-left: .6pt solid #000;
    }

    .fee-copy__cell {
        min-height: 0;
        gap: .3mm;
        padding: .5mm .7mm;
        border: 0;
        border-right: .6pt solid #000;
        border-bottom: .6pt solid #000;
    }

    .fee-copy__cell-label {
        font-size: 6.5pt;
        line-height: 1.08;
    }

    .fee-copy__cell-amount {
        font-size: 7pt;
    }

    .fee-copy__total {
        background: #fff !important;
        font-weight: 700;
    }

    .fee-copy__included {
        font-size: 6.5pt;
        background: #fff !important;
    }

    .fee-copy__words {
        margin: .7mm 0;
        padding: .7mm 1mm;
        border: .6pt dashed #000;
        font-size: 7pt;
    }

    .fee-copy__bank {
        font-size: 6.5pt;
    }

    .fee-copy__branches {
        display: block;
    }

    .fee-copy__branches span {
        display: inline;
    }

    .fee-copy__branches span::after {
        content: ' \00b7 ';
    }

    .fee-copy__branches span:last-child::after {
        content: '';
    }

    .fee-copy__sign {
        margin-top: 2mm;
        font-size: 6.5pt;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}
