/* Application-specific adjustments only. Color palette, type, Forminator inputs, native
   validation, progress indicator and buttons come from assets/assessment.css. */
.rfs-application .rfs-app-signature-host {
    margin: 8px 0 18px;
}
.rfs-application .rfs-app-signature {
    display: block;
    width: 100%;
    max-width: 640px;
    height: 170px;
    border: 1px solid var(--rfs-line);
    border-radius: 9px;
    background: #fff;
    color: var(--rfs-ink);
    cursor: crosshair;
}
.rfs-application .rfs-app-signature:focus-visible {
    outline: 2px solid var(--rfs-accent);
    outline-offset: 2px;
}
.rfs-application .rfs-app-clear {
    margin-top: 10px;
    padding: 7px 13px;
    border: 1px solid var(--rfs-line);
    background: #fff;
    color: var(--rfs-ink);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
}
.rfs-application .rfs-app-clear:focus-visible {
    outline: 2px solid var(--rfs-accent);
}
.rfs-application .rfs-app-signature-error {
    color: var(--rfs-accent);
    font-size: 13px;
}
.rfs-application .rfs-application-notice {
    font-size: 13px;
    line-height: 1.6;
}
.rfs-application .rfs-application-notice a {
    color: var(--rfs-accent);
}
@media (max-width: 660px) {
    .rfs-application .rfs-hero {
        flex-direction: column;
    }
}

/* Use the existing intake palette and Forminator typography for validation and review. */
.rfs-application .rfs-app-signature-help {
    color: #f34747;
    font-size: 13px;
    margin: 0 0 9px;
}
.rfs-application .rfs-app-validation-error {
    margin: 6px 0 0;
    color: var(--rfs-accent);
    font-size: 13px;
    line-height: 1.5;
}
.rfs-application .forminator-ui .rfs-app-invalid {
    border-color: var(--rfs-accent) !important;
}
.rfs-application .forminator-ui .rfs-app-invalid:focus-visible {
    outline: 2px solid var(--rfs-accent);
    outline-offset: 2px;
}
.rfs-application .rfs-app-review-host {
    margin: 4px 0 26px;
}
.rfs-application .rfs-app-review-host .rfs-review {
    margin-top: 15px;
}
.rfs-application .rfs-app-signature-host {
    max-width: 100%;
}
@media (max-width: 660px) {
    .rfs-application .rfs-app-signature {
        height: 145px;
    }
    .rfs-application .rfs-app-review-host {
        margin-bottom: 20px;
    }
}

/* ---- Validation: bold red, impossible to miss ---------------------------------------- */
.rfs-application {
    --rfs-error: #c40000;
}

/* Error summary shown at the top of the step */
.rfs-application .rfs-app-error-summary {
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 3px solid var(--rfs-error);
    border-radius: 10px;
    background: #fff1f1;
    color: var(--rfs-error);
    font-weight: 800;
}
.rfs-application .rfs-app-error-summary:focus {
    outline: 3px solid var(--rfs-error);
    outline-offset: 2px;
}
.rfs-application .rfs-app-error-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
    color: var(--rfs-error);
}
.rfs-application .rfs-app-error-summary ul {
    margin: 0;
    padding-left: 20px;
}
.rfs-application .rfs-app-error-summary li {
    margin: 6px 0;
    font-weight: 700;
    color: var(--rfs-error);
}
.rfs-application .rfs-app-error-link {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 800;
    color: var(--rfs-error);
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}
.rfs-application .rfs-app-error-link:hover,
.rfs-application .rfs-app-error-link:focus-visible {
    text-decoration-thickness: 3px;
}

/* The field itself */
/* .rfs-application .rfs-app-field-invalid {
    box-shadow: inset 5px 0 0 var(--rfs-error);
    background: #fff6f6;
    border-radius: 8px;
    padding-left: 12px;
} */
.rfs-application .rfs-app-field-invalid .forminator-label,
.rfs-application .rfs-app-field-invalid label.forminator-label {
    color: var(--rfs-error) !important;
    font-weight: 800 !important;
}
.rfs-application .rfs-app-field-invalid .forminator-input,
.rfs-application .rfs-app-field-invalid .forminator-textarea,
.rfs-application .rfs-app-field-invalid select,
.rfs-application .rfs-app-field-invalid .select2-selection,
.rfs-application .forminator-ui .rfs-app-invalid {
    border: 2px solid var(--rfs-error) !important;
    box-shadow: 0 0 0 2px rgba(196, 0, 0, 0.18) !important;
}
.rfs-application .rfs-app-field-invalid .forminator-radio .forminator-radio-image,
.rfs-application .rfs-app-field-invalid .forminator-checkbox .forminator-checkbox-box {
    border-color: var(--rfs-error) !important;
}

/* Messages: ours and Forminator's own */
.rfs-application .rfs-app-validation-error,
.rfs-application .rfs-app-signature-error,
.rfs-application .forminator-error-message {
    display: block;
    margin: 6px 0 0;
    background: #F9E4E8;
    color: var(--rfs-error) !important;
    font-size: 14px !important;
    /* font-weight: 800 !important; */
    line-height: 1.4;
        padding: 5px 10px 0;
}
.rfs-application .rfs-app-signature-error[hidden] {
    display: none;
}

/* Signature pad */
.rfs-application .rfs-app-signature-host.rfs-app-field-invalid {
    padding: 10px 12px;
}
.rfs-application .rfs-app-signature-host.rfs-app-field-invalid .rfs-app-signature {
    border: 3px solid var(--rfs-error);
}
.rfs-application .rfs-app-signature-host.rfs-app-field-invalid .forminator-label {
    color: var(--rfs-error);
    font-weight: 800;
}

/* Forminator's top-of-form "Please check the highlighted fields." message */
.rfs-application .forminator-response-message.forminator-error {
    color: var(--rfs-error) !important;
    font-weight: 800 !important;
    border-color: var(--rfs-error) !important;
}

/* ---- Printing the application receipt ------------------------------------------------
   print.js copies the result card into .rfs-print-surface, which lives OUTSIDE .rfs-assessment.
   The colour variables are only defined inside .rfs-assessment, so without the block below the
   printed card loses its colours, and browsers drop backgrounds unless colour adjust is forced.
   These rules make the printed receipt match the on-screen card. */
@media print {
    @page {
        margin: 14mm;
    }
    html body.rfs-printing .rfs-print-surface {
        --rfs-ink: #000000;
        --rfs-muted: #feeded;
        --rfs-accent: #f34747;
        --rfs-line: #feeded;
        display: block !important;
        color: var(--rfs-ink);
        font-family: inherit;
        text-align: left;
    }
    html body.rfs-printing .rfs-print-surface,
    html body.rfs-printing .rfs-print-surface * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result {
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        padding: 34px 36px;
        background: var(--rfs-muted) !important;
        border: 1px solid var(--rfs-accent) !important;
        border-radius: 18px;
        color: var(--rfs-accent);
        break-inside: avoid;
        page-break-inside: avoid;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result-icon {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0 0 18px;
        background: var(--rfs-accent) !important;
        border-radius: 50%;
        color: #fff;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result-icon svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: #fff;
        stroke-width: 2;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result p.rfs-eyebrow {
        color: var(--rfs-ink);
        font-size: 11px !important;
        font-weight: 600;
        letter-spacing: 0.08em;
        margin: 0 0 8px !important;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result h2 {
        color: var(--rfs-accent);
        margin: 0 0 12px;
        font-size: 32px;
        line-height: 1.25;
        letter-spacing: -0.03em;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result p {
        color: var(--rfs-ink);
        font-size: 14px !important;
        line-height: 1.7 !important;
        margin: 12px 0 !important;
    }
    html body.rfs-printing .rfs-print-surface .rfs-result p.rfs-reference {
        color: var(--rfs-ink);
        font-size: 11px !important;
        padding-bottom: 18px;
        border-bottom: 1px solid #fff;
    }
    html body.rfs-printing .rfs-print-surface .rfs-reference strong {
        font-weight: 700;
    }
    html body.rfs-printing .rfs-print-surface .rfs-next-steps {
        margin: 22px 0;
        padding: 18px 20px;
        background: #fff !important;
        border: 1px solid #dce8e2;
        border-radius: 12px;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    html body.rfs-printing .rfs-print-surface .rfs-next-steps h3 {
        color: var(--rfs-accent);
        font-size: 16px;
        margin: 0 0 8px;
    }
    html body.rfs-printing .rfs-print-surface .rfs-next-steps p {
        margin: 0 !important;
    }
    html body.rfs-printing .rfs-print-surface .rfs-print,
    html body.rfs-printing .rfs-print-surface .rfs-print-note {
        display: none !important;
    }
}
