/* ======================================
   FORM — fysiotherapie-maatwerk
   ====================================== */

:root {
    --fm-gap: 10px;
    --fm-radius: 2px;
    --fm-input-padding: 14px 16px;
}

.fm_form {
    font-family: var(--bodyfont, 'Roboto', sans-serif);
    max-width: 100%;
    position: relative;
}

/* ── Field wrapper ─────────────────────────────── */
.fm_form .fm_form_fields .fm_form_field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    min-width: 0;
}

/* ── Input element container ───────────────────── */
.fm_form .fm_form_fields .fm_form_field .fm_form_field_el {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: var(--fm-radius);
    overflow: hidden;
}

/* ── Inputs, textarea, select ──────────────────── */
.fm_form .fm_form_field_input {
    padding: var(--fm-input-padding);
    font-family: var(--bodyfont, 'Roboto', sans-serif);
    font-size: 15px;
    color: var(--text, #4c6575);
    line-height: 1.4;
    background-color: var(--border, #f5f5f5);
    border: 0px solid var(--border-dark, #e9e9e9);
    border-radius: var(--fm-radius);
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.fm_form .fm_form_field_input::placeholder {
    color: var(--text);
    font-size: 15px;
    font-weight: 400;
}

.fm_form .fm_form_field_input:focus {
    border-color: var(--primary)!important;
    box-shadow: 0 0 0 3px rgba(37, 137, 139, 0.12)!important;
}

/* ── Select: custom chevron ────────────────────── */
.fm_form select.fm_form_field_input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b7c1c8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
}

.fm_form select.fm_form_field_input option[value=""][disabled] {
    color: var(--text-light, #b7c1c8);
}

/* ── Textarea ──────────────────────────────────── */
.fm_form textarea.fm_form_field_input {
    resize: vertical;
    min-height: 110px;
}

/* ── Error message ─────────────────────────────── */
.fm_form .fm_form_field_message {
    min-height: 0;
}

.fm_form .fm_form_field_error {
    font-size: 12px;
    font-weight: 500;
    color: #c0392b;
    padding: 2px 0 0 2px;
}

/* ── Error state on input ──────────────────────── */
.fm_form .fm_form_field_input.fm_error {
    border-color: #e74c3c;
}

/* ── Submit button ─────────────────────────────── */
.fm_form_field_submit {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.fm_form .fm_btn.fm_btn_primary {
    background-color: var(--secondary, #f57e57);
    color: #fff;
    padding: 13px 32px;
    border: none;
    border-radius: var(--fm-radius);
    font-family: var(--bodyfont, 'Roboto', sans-serif);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(245, 126, 87, 0.30);
    letter-spacing: 0.01em;
}

.fm_form .fm_btn.fm_btn_primary:hover {
    background-color: var(--secondary-dark, #e97853);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(245, 126, 87, 0.38);
}

.fm_form .fm_btn.fm_btn_primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(245, 126, 87, 0.25);
}

.fm_form .fm_btn.fm_btn_primary span {
    display: inline-block;
}

/* ── Consent checkbox ──────────────────────────── */
.fm_consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 0;
    width: 100%;
    box-sizing: border-box;
}

.fm_consent #fm_consent_checkbox {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary, #25898b);
    flex-shrink: 0;
}

.fm_consent .fm_text.fm_txt_light {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-light, #b7c1c8);
    font-family: var(--bodyfont, 'Roboto', sans-serif);
}

.fm_consent .fm_text.fm_txt_primary {
    color: var(--primary, #25898b);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.fm_consent .fm_text.fm_txt_primary:hover {
    color: var(--primary-darker, #1e6e6f);
}

/* ── Loading state ─────────────────────────────── */
.fm_form .fm_form_field_loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    position: absolute;
    inset: 0;
    background-color: var(--primary, #25898b);
    border-radius: var(--fm-radius);
}

.fm_form .fm_form_field_loader .fm_form_field_spinner {
    width: 28px;
    height: 28px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fm-spin 0.75s linear infinite;
}

@keyframes fm-spin {
    to { transform: rotate(360deg); }
}

.fm_form .fm_form_field_loader p {
    font-family: var(--bodyfont, 'Roboto', sans-serif);
    font-size: 18px;
    color: white;
    margin: 0;
    font-weight: 600;
}

/* ── Confirmation modal ────────────────────────── */
.fm_form_field_modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(23, 23, 23, 0.65);
    z-index: 999999;
}

.fm_form_field_modal .fm_form_field_modal_content {
    width: 340px;
    background-color: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.fm_form_field_modal_content .fm_sent_confirmation_img {
    width: 80px;
    height: 80px;
}

.fm_form_field_modal_content .fm_sent_confirmation_img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fm_form_field_modal_content .fm_sent_confirmation_content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.fm_form_field_modal_content .fm_btn.fm_btn_primary.fm_form_field_modal_close {
    background-color: var(--primary, #25898b);
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: var(--fm-radius);
    font-family: var(--bodyfont, 'Roboto', sans-serif);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fm_form_field_modal_content .fm_btn.fm_btn_primary.fm_form_field_modal_close:hover {
    background-color: var(--primary-darker, #1e6e6f);
}

/* ── Column grid ────────────────────────────────── */
.fm_form .fm_col_12 { flex: 0 0 100%; max-width: 100%; box-sizing: border-box; }
.fm_form .fm_col_9  { flex: 0 0 calc(75% - 3px); max-width: calc(75% - 3px); box-sizing: border-box; }
.fm_form .fm_col_8  { flex: 0 0 calc(66.666% - 4px); max-width: calc(66.666% - 4px); box-sizing: border-box; }
.fm_form .fm_col_6  { flex: 0 0 calc(50% - 6px); max-width: calc(50% - 6px); box-sizing: border-box; }
.fm_form .fm_col_4  { flex: 0 0 calc(33.333% - 8px); max-width: calc(33.333% - 8px); box-sizing: border-box; }
.fm_form .fm_col_3  { flex: 0 0 calc(25% - 9px); max-width: calc(25% - 9px); box-sizing: border-box; }

/* ── Responsive: single column on mobile ────────── */
@media (max-width: 600px) {
    .fm_form [class*="fm_col_"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
