/* ── Layout shell ─────────────────────── */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Header ───────────────────────────────────────────── */
.site-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-shrink: 0;
}

.site-header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--header-padding-y) var(--header-padding-x);
    background: #fff;
    border-bottom: 1px solid var(--header-border-color);
}

.site-header__council-logo {
    width: var(--logo-council-width);
    height: var(--logo-council-height);
    object-fit: contain;
}

.site-header__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.site-header__powered-by {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 15px;
    line-height: 24px;
    letter-spacing: 0.1px;
    color: #828282;
    white-space: nowrap;
}

.site-header__flexipay-logo {
    width: var(--logo-flexipay-width);
    height: 31px;
    object-fit: contain;
}

.site-header__accent-bar {
    height: var(--header-accent-bar-height);
    background: var(--header-accent-bar-bg);
    width: 100%;
}

/* ── Main (blurred background content) ───────────────── */
.site-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 60px;
}

.content-row {
    display: flex;
    flex-direction: row;
    gap: 46px;
    align-items: flex-start;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.hero-text__heading {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: var(--ui-black);
}

.hero-text__body {
    font-family: var(--font-family-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    color: var(--neutrals-dark);
}

.form-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 20px;
    width: 375px;
    flex-shrink: 0;
}

.section-title-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.section-title {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--section-divider-color);
    padding: var(--section-padding-y) 0;
    width: 100%;
}

.section-title__text {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 20px;
    line-height: 36px;
    color: var(--ui-black);
    flex: 1;
}

.fe-input-field {
    width: 100%;
    height: var(--input-height);
    background: var(--input-bg);
    border: var(--input-border-width) solid transparent;
    border-radius: var(--input-border-radius);
    padding: 0 var(--input-padding);
    font-family: var(--font-family-body);
    font-weight: var(--input-font-weight);
    font-size: var(--input-font-size);
    line-height: var(--input-line-height);
    color: var(--input-color);
    outline: none;
    transition: var(--transition-base);
    box-sizing: border-box;
}

    .fe-input-field::placeholder {
        color: var(--input-color-placeholder);
    }

    .fe-input-field:focus {
        box-shadow: 0 0 0 2px var(--ui-black);
    }

    /* Error state — red border */
    .fe-input-field.input-validation-error {
        border-color: var(--input-border-error) !important;
    }

.fe-input-error {
    font-family: var(--font-family-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--helper-color-error);
    width: 100%;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--btn-height-mobile);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border: var(--btn-border-width) solid var(--btn-primary-border);
    border-radius: var(--btn-border-radius);
    font-family: var(--font-family-heading);
    font-weight: var(--btn-font-weight-mobile);
    font-size: var(--btn-font-size-mobile);
    cursor: pointer;
    white-space: nowrap;
    transition: .2s ease;
}

    /* Hover */
    .btn-primary:hover {
        background: var(--color-brand-orange);
        border-color: var(--color-brand-orange);
        color: var(--neutrals-white);
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(229,116,30,.28);
    }

    /* After click / focus */
    .btn-primary:focus,
    .btn-primary:focus-visible {
        outline: none;
        background: var(--color-brand-orange);
        border-color: var(--color-brand-orange);
        color: var(--neutrals-white);
        box-shadow: 0 0 0 3px rgba(229,116,30,.35);
    }

    /* Click pressed */
    .btn-primary:active {
        background: #C96417;
        border-color: #C96417;
        color: var(--neutrals-white);
        transform: translateY(1px);
        box-shadow: none;
    }

.or-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.or-divider__line {
    flex: 1;
    height: 1px;
    background: var(--neutrals-muted);
}

.or-divider__label {
    font-family: var(--font-family-body);
    font-size: 14px;
    color: var(--ui-black);
}

.qr-hint-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: var(--neutrals-white);
    border: 1px solid var(--neutrals-muted);
    border-radius: var(--radio-card-border-radius);
}

.qr-hint-card__text {
    flex: 1;
    font-family: var(--font-family-body);
    font-size: 16px;
    line-height: 20px;
    color: var(--ui-coal);
}

.qr-hint-card__icon {
    flex-shrink: 0;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(to bottom, #fff3d8, #ffe1b0);
    overflow: hidden;
}

    .qr-hint-card__icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.reference-number-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-top: auto;
    padding: var(--footer-padding-y) var(--footer-padding-x);
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border-color);
}

.site-footer__text {
    font-family: var(--font-family-body);
    font-size: 14px;
    line-height: 20px;
    color: var(--footer-text-color);
    text-align: center;
}

    .site-footer__text a {
        color: var(--footer-text-color);
        text-decoration: underline;
    }

/* OVERLAY + MODAL */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    /* hidden by default */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

    .overlay.show {
        visibility: visible;
        opacity: 1;
        pointer-events: all;
    }

.spinner-modal {
    background: var(--neutrals-white);
    border-radius: 16px;
    box-shadow: 0px 1.2px 24px 0px rgba(0, 0, 0, 0.1), 0px 6.4px 14.4px 0px rgba(221, 226, 234, 0.13);
    width: 341px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    gap: 8px;
}

/* ── Spinner ──────────────────────────────────────────── */
.spinner {
    width: 63px;
    height: 63px;
    border-radius: 50%;
    border: 6px solid #f0f0f0;
    border-top-color: #F97316; /* orange brand colour */
    border-right-color: #FDBA74; /* lighter orange */
    animation: spin 0.9s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Modal text ───────────────────────────────────────── */
.modal__title {
    font-family: var(--font-family-heading);
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    color: var(--neutrals-dark);
    text-align: center;
    white-space: nowrap;
}

.modal__body {
    font-family: var(--font-family-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--ui-coal);
    text-align: center;
    width: 100%;
}

/* RESPONSIVE — Mobile (≤ 767px)  */
@media (max-width: 767px) {

    .site-main {
        padding: 0;
        display: block;
    }

    .site-header__nav {
        padding: var(--header-padding-y) 24px;
    }

    .content-row {
        flex-direction: column;
        gap: 0;
    }

    .hero-text {
        gap: 8px;
        padding: 20px 18px;
    }

    .hero-text__heading {
        font-size: 24px;
        line-height: 36px;
    }

    .hero-text__body {
        font-size: 14px;
        color: var(--ui-coal);
    }

    .form-panel {
        width: 100%;
        padding: 0 18px 18px;
    }

    .qr-hint-card__text {
        font-size: 14px;
    }

    /* Modal stays the same width on mobile — matches Figma */
    .spinner-modal {
        width: calc(100% - 34px); /* 375 - 17*2 side margin */
        max-width: 341px;
    }
}
