/* RFM Forms — visual tokens come from the active child theme via CSS variables.
   Override --rfm-form-* in your theme's :root to brand it. */
.rfm-form { max-width: 720px; margin: 0 auto; }
.rfm-form *, .rfm-form *::before, .rfm-form *::after { box-sizing: border-box; }
.rfm-form-hp { position: absolute !important; left: -9999px !important; height: 0 !important; width: 0 !important; overflow: hidden !important; }

.rfm-form-field { margin-bottom: 18px; }
.rfm-form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; color: var(--rfm-form-label, #111); }
.rfm-form-prompt {
    font-family: var(--rfm-form-display-font, inherit);
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--rfm-form-text, #111);
    margin: 0 0 28px;
}
.rfm-form-req { color: var(--rfm-form-error, #d63638); margin-left: 4px; }

.rfm-form-field input,
.rfm-form-field textarea {
    width: 100%; padding: 14px 16px;
    border: 1.5px solid var(--rfm-form-border, #e0e0e0);
    border-radius: var(--rfm-form-radius, 10px);
    font: inherit; font-size: 1rem;
    background: var(--rfm-form-bg, #fff);
    color: var(--rfm-form-text, #111);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.rfm-form-field input:focus,
.rfm-form-field textarea:focus {
    outline: none;
    border-color: var(--rfm-form-accent, #2271b1);
    box-shadow: 0 0 0 3px var(--rfm-form-accent-faint, rgba(34,113,177,0.12));
}
.rfm-form-field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }

/* ============================================================
   Radio (quiz options) — big tappable cards
   ============================================================ */
.rfm-form-field-radio { margin: 0; }
.rfm-form-radio-group { display: flex; flex-direction: column; gap: 10px; }
.rfm-form-radio-option {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px;
    background: var(--rfm-form-bg, #fff);
    border: 2px solid var(--rfm-form-border, #e0e0e0);
    border-radius: var(--rfm-form-radius, 10px);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1.02rem;
    color: var(--rfm-form-text, #111);
    font-weight: 500;
    line-height: 1.4;
    user-select: none;
    position: relative;
}
.rfm-form-radio-option:hover {
    border-color: var(--rfm-form-accent, #2271b1);
    background: var(--rfm-form-accent-faint, rgba(34,113,177,0.06));
    transform: translateY(-1px);
}
.rfm-form-radio-option input[type=radio] {
    appearance: none; -webkit-appearance: none;
    width: 22px; height: 22px;
    border: 2px solid var(--rfm-form-border, #e0e0e0);
    border-radius: 50%;
    margin: 0; padding: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
    cursor: pointer;
    background: transparent;
}
.rfm-form-radio-option input[type=radio]:checked {
    border-color: var(--rfm-form-accent, #2271b1);
    background: radial-gradient(circle, var(--rfm-form-accent, #2271b1) 50%, transparent 53%);
}
.rfm-form-radio-option:has(input:checked) {
    border-color: var(--rfm-form-accent, #2271b1);
    background: var(--rfm-form-accent-faint, rgba(34,113,177,0.08));
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}
.rfm-form-radio-label { flex: 1; }

.rfm-form-error { color: var(--rfm-form-error, #d63638); font-size: 0.88rem; margin-top: 6px; min-height: 1em; }

/* ============================================================
   Buttons / actions
   ============================================================ */
.rfm-form-actions { margin-top: 28px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rfm-form-actions-multistep { justify-content: space-between; }
.rfm-form-submit, .rfm-form-next, .rfm-form-prev {
    background: var(--rfm-form-accent, #2271b1);
    color: var(--rfm-form-on-accent, #fff);
    padding: 14px 32px;
    border: none;
    border-radius: var(--rfm-form-button-radius, 999px);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.05s, background 0.15s;
    min-height: 50px;
    display: inline-flex; align-items: center; justify-content: center;
}
.rfm-form-prev {
    background: transparent;
    color: var(--rfm-form-text, #111);
    border: 1.5px solid var(--rfm-form-border, #e0e0e0);
    padding: 14px 24px;
}
.rfm-form-prev:hover { border-color: var(--rfm-form-accent, #2271b1); color: var(--rfm-form-accent, #2271b1); }
.rfm-form-prev:disabled { opacity: 0.3; cursor: not-allowed; }
.rfm-form-submit:hover, .rfm-form-next:hover { opacity: 0.92; transform: translateY(-1px); }
.rfm-form-submit:active, .rfm-form-next:active { transform: translateY(0); }
.rfm-form-submit:disabled { opacity: 0.5; cursor: wait; }

.rfm-form-status { margin-top: 16px; padding: 12px 16px; border-radius: 10px; display: none; font-size: 0.95rem; line-height: 1.5; }
.rfm-form-status.is-success { display: block; background: #e7f5ec; color: #1a6c2b; border: 1px solid #b8dec6; }
.rfm-form-status.is-error   { display: block; background: #fde7e7; color: #842029; border: 1px solid #f5c2c7; }
.rfm-form-turnstile-wrap { margin: 16px 0; min-height: 65px; }
@media (max-width: 600px) { .rfm-form-submit, .rfm-form-next { width: 100%; } }

/* ============================================================
   Multi-step — progress bar + step transitions
   ============================================================ */
.rfm-form-progress {
    height: 6px;
    background: var(--rfm-form-border, #e0e0e0);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}
.rfm-form-progress-bar {
    height: 100%;
    background: var(--rfm-form-accent, #2271b1);
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.rfm-form-progress-label {
    font-size: 0.84rem;
    color: var(--rfm-form-label, #555);
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 32px;
    text-align: right;
    text-transform: uppercase;
}

.rfm-form-steps-wrap {
    position: relative;
    min-height: 280px;
}
.rfm-form-step {
    border: 0; padding: 0; margin: 0;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.rfm-form-step.is-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.rfm-form-step.is-entering {
    opacity: 0;
    transform: translateY(20px);
}
.rfm-form-step-legend {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rfm-form-accent, #2271b1);
    margin-bottom: 16px;
    padding: 0;
}
