/* ==========================================================================
   Caledonia — form component

   Token-driven styling over the Umbraco Forms default markup, so the booking
   form (and any other Caledonia form) matches the design without a bespoke
   Forms theme. Scoped under .cal-form-section so it never touches the Kelvin
   .ks-form styles.
   ========================================================================== */

.cal-form-section {
    width: 100%;
    padding: 2.5rem 1.5rem 3rem;
    background-color: var(--theme-bg);
    color: var(--theme-text);
}

.cal-form-card {
    max-width: 46rem;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--theme-border);
    border-radius: 0.75rem;
    padding: 1.75rem;
}

.cal-form-head h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--theme-text);
}

.cal-form-head p {
    margin: 0 0 1rem;
    color: var(--theme-text-muted);
}

.cal-form-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    padding: 0;
    margin: 0 0 1.25rem;
}

.cal-form-badges li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--theme-text);
}

.cal-form-badges li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--status-vacant-text);
    font-weight: 800;
}

/* ── Umbraco Forms default markup, themed ─────────────────────────────────── */

.cal-form-section .umbraco-forms-field {
    margin-bottom: 1rem;
}

.cal-form-section .umbraco-forms-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--theme-text);
}

.cal-form-section .umbraco-forms-tooltip {
    display: block;
    font-size: 0.75rem;
    color: var(--theme-text-muted);
    margin-bottom: 0.3rem;
}

.cal-form-section input[type="text"],
.cal-form-section input[type="email"],
.cal-form-section input[type="tel"],
.cal-form-section input[type="number"],
.cal-form-section input[type="date"],
.cal-form-section select,
.cal-form-section textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--theme-text);
    background: #ffffff;
    border: 1.5px solid var(--theme-border);
    border-radius: 0.375rem;
    box-sizing: border-box;
}

.cal-form-section input:focus,
.cal-form-section select:focus,
.cal-form-section textarea:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px rgba(0, 89, 187, 0.15);
}

.cal-form-section textarea { min-height: 5rem; resize: vertical; }

/* Hidden fields (e.g. unitReference) must never take layout space. */
.cal-form-section .umbraco-forms-field.hidden,
.cal-form-section input[type="hidden"] {
    display: none;
}

.cal-form-section .umbraco-forms-field.dataconsent label,
.cal-form-section .umbraco-forms-field.checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 0.8125rem;
    color: var(--theme-text-muted);
}

.cal-form-section .field-validation-error,
.cal-form-section .umbraco-forms-field.error input,
.cal-form-section .validation-summary-errors {
    color: #b3261e;
    border-color: #b3261e;
}

.cal-form-section button[type="submit"],
.cal-form-section input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--theme-btn-bg);
    color: var(--theme-btn-text);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cal-form-section button[type="submit"]:hover,
.cal-form-section input[type="submit"]:hover {
    background: var(--theme-btn-hover);
}

.cal-form-privacy {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    color: var(--theme-text-muted);
}

.cal-form-section .umbraco-forms-submitmessage {
    padding: 1rem 1.25rem;
    background: var(--status-vacant-bg);
    color: var(--status-vacant-text);
    border-radius: 0.5rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .cal-form-section button[type="submit"] { transition: none; }
}
