/* =========================================================
   LTC application forms page (Enrolment + APL)
   Uses the education theme tokens; restyles Formidable to match.
   ========================================================= */

.ltc-forms-page { background: var(--ed-white); }

.ltc-forms__inner {
    max-width: 880px;
    margin: 0 auto;
    padding: calc(44px + 80px + 80px) 40px 96px;
}
.admin-bar .ltc-forms__inner { padding-top: calc(76px + 80px + 80px); }

.ltc-forms__intro {
    max-width: 680px;
    margin: 0 auto 48px;
    text-align: center;
}

/* ── Which form do I need? ────────────────────────────── */
.ltc-choice .ed-mission-section__h2 { margin-bottom: 24px; }

.ltc-choice__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ltc-choice__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--card-accent, var(--ed-teal));
    border-radius: 4px;
    background: var(--ed-white);
}
.ltc-choice__card.is-active {
    background: var(--ed-light);
    box-shadow: 0 0 0 2px var(--card-accent, var(--ed-teal));
}
.ltc-choice__card .ed-btn { align-self: flex-start; margin-top: auto; }

.ltc-choice__tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--card-accent, var(--ed-teal));
}
.ltc-choice__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ed-text);
    letter-spacing: -0.01em;
}
.ltc-choice__desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ed-muted);
}
.ltc-choice__help {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--ed-muted);
    text-align: center;
}
.ltc-choice__help a { color: var(--ed-teal); text-decoration: underline; }

/* ── Form panel ───────────────────────────────────────── */
.ltc-form-panel {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    scroll-margin-top: 140px;
}
.ltc-form-panel__note {
    font-size: 0.9rem;
    color: var(--ed-muted);
    margin-bottom: 24px;
}
.screen-reader-text,
.ltc-grid-cell .frm_primary_label {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.ltc-form-panel .frm_forms,
.ltc-form-panel .frm_forms input,
.ltc-form-panel .frm_forms textarea,
.ltc-form-panel .frm_forms select,
.ltc-form-panel .frm_forms button { font-family: var(--ed-font); }

.ltc-form-panel .frm_form_fields > fieldset { border: 0; padding: 0; margin: 0; }

/* Section headings echo the numbered bars of the paper form. */
.ltc-form-panel .frm_section_heading { margin-top: 40px; }
.ltc-form-panel .frm_section_heading h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ed-text);
    padding: 0 0 10px;
    margin: 0 0 16px;
    border-bottom: 2px solid var(--ed-teal);
    text-transform: none;
}
.ltc-form-panel .frm_section_heading .frm_description,
.ltc-form-panel .frm_description {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--ed-muted);
}

.ltc-form-panel .frm_primary_label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ed-text);
    margin-bottom: 6px;
}
.ltc-form-panel .frm_required { color: #b42318; }

.ltc-form-panel input[type="text"],
.ltc-form-panel input[type="email"],
.ltc-form-panel input[type="tel"],
.ltc-form-panel input[type="date"],
.ltc-form-panel textarea,
.ltc-form-panel select {
    width: 100%;
    border: 1px solid #c4c9d1;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--ed-text);
    background: var(--ed-white);
    box-shadow: none;
}
.ltc-form-panel input:focus,
.ltc-form-panel textarea:focus,
.ltc-form-panel select:focus {
    border-color: var(--ed-teal);
    outline: 2px solid var(--ed-teal);
    outline-offset: 1px;
}

.ltc-form-panel .frm_radio label,
.ltc-form-panel .frm_checkbox label { font-size: 0.95rem; color: var(--ed-text); }
.ltc-form-panel input[type="radio"],
.ltc-form-panel input[type="checkbox"] { accent-color: var(--ed-teal); width: 18px; height: 18px; }

/* Declarations: one statement per box, as on the form. */
.ltc-form-panel .ltc-declaration { margin-bottom: 6px; }
.ltc-form-panel .ltc-declaration .frm_checkbox label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    line-height: 1.5;
}
.ltc-form-panel .ltc-declaration input[type="checkbox"] { flex-shrink: 0; margin-top: 3px; }

/* Tables from the paper form: a header row, then cells in a 12-col grid. */
.ltc-grid-head { margin-bottom: 0 !important; }
.ltc-grid-title { font-size: 0.875rem; font-weight: 700; color: var(--ed-text); margin-bottom: 8px; }
.ltc-grid-cols {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0 2%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ed-muted);
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.ltc-grid-cols .frm2 { grid-column: span 2; }
.ltc-grid-cols .frm3 { grid-column: span 3; }
.ltc-grid-cols .frm4 { grid-column: span 4; }
.ltc-grid-cols .frm5 { grid-column: span 5; }
.ltc-grid-cols .frm8 { grid-column: span 8; }
.ltc-form-panel .ltc-grid-cell { margin-bottom: 8px !important; }
.ltc-form-panel .ltc-grid-cell input { padding: 8px 10px; font-size: 0.9rem; }
.ltc-grid-extra.is-hidden { display: none !important; }
.ltc-grid-more {
    grid-column: span 12;
    justify-self: start;
    background: none;
    border: 1px dashed var(--ed-teal);
    color: var(--ed-teal);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 4px;
    margin: 4px 0 16px;
}

.ltc-static { font-size: 0.95rem; }
.ltc-static__label { font-weight: 700; margin-right: 8px; }
.ltc-note {
    font-size: 0.875rem;
    color: var(--ed-muted);
    background: var(--ed-light);
    border-left: 3px solid var(--ed-teal);
    padding: 10px 14px;
}

/* Typed signature: the full name is the signature, so it is set like one. */
.ltc-form-panel .ltc-typed-signature input {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.2rem;
    border-width: 0 0 2px;
    border-radius: 0;
    border-color: var(--ed-text);
    background: var(--ed-light);
}

.ltc-wordcount-meter { font-size: 0.8rem; color: var(--ed-muted); margin-top: 4px; }
.ltc-wordcount-meter.is-over { color: #b42318; font-weight: 700; }

.ltc-form-panel .frm_dropzone {
    border: 1px dashed #c4c9d1;
    border-radius: 4px;
    background: var(--ed-light);
}

.ltc-form-panel .frm_error,
.ltc-form-panel .frm_error_style { color: #b42318; font-size: 0.85rem; }

.ltc-form-panel .with_frm_style .frm_submit button.frm_button_submit {
    height: 48px;
    padding: 0 32px;
    border-radius: 4px;
    border: 2px solid var(--ed-accent) !important;
    background: var(--ed-accent) !important;
    color: var(--ed-white) !important;
    font-family: var(--ed-font);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 24px;
    box-shadow: none;
}
.ltc-form-panel .with_frm_style .frm_submit button.frm_button_submit:hover,
.ltc-form-panel .with_frm_style .frm_submit button.frm_button_submit:focus-visible {
    background: var(--ed-accent-hover) !important;
    border-color: var(--ed-accent-hover) !important;
}

.ltc-form-panel .frm_dropzone .dz-message svg { width: 28px; height: 28px; margin: 0 auto 8px; display: block; }

/* Declarations have their label hidden; show the required mark on the statement. */
.ltc-form-panel .ltc-declaration .frm_checkbox label::after { content: " *"; color: #b42318; }

.ltc-form-panel .frm_message {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #05603a;
    padding: 16px 20px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .ltc-forms__inner { padding: calc(60px + 40px) 24px 64px; }
    .admin-bar .ltc-forms__inner { padding-top: calc(60px + 40px); }
    .ltc-choice__grid { grid-template-columns: 1fr; }
    .ltc-choice__card { padding: 22px; }

    /* Tables stack on phones: show each cell's own label instead of the header row. */
    .ltc-grid-cols { display: none; }
    .ltc-grid-cell .frm_primary_label {
        position: static !important;
        width: auto; height: auto;
        clip: auto;
        white-space: normal;
        display: block !important;
        visibility: visible !important;
        font-size: 0.8rem;
    }
    .ltc-form-panel .ltc-grid-cell.frm_first { margin-top: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .ltc-choice__card .ed-btn { transition: none; }
}
