/* CF Master – Public Form Styles */

.cfm-form-wrap {
    max-width: 700px;
    margin: 0 auto;
}

.cfm-form {
    background: #fff;
    padding: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
.cfm-field {
    margin-bottom: 18px;
    box-sizing: border-box;
}
.cfm-field-half {
    display: inline-block;
    width: calc(50% - 8px);
    vertical-align: top;
}
.cfm-field-half + .cfm-field-half { margin-left: 16px; }

.cfm-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.cfm-required {
    color: #ef4444;
    margin-left: 3px;
}

/* ── Inputs ─────────────────────────────────────────────────────────────── */
.cfm-form input[type="text"],
.cfm-form input[type="email"],
.cfm-form input[type="tel"],
.cfm-form input[type="number"],
.cfm-form input[type="url"],
.cfm-form input[type="date"],
.cfm-form input[type="file"],
.cfm-form textarea,
.cfm-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #fafafa;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}
.cfm-form input:focus,
.cfm-form textarea:focus,
.cfm-form select:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.cfm-form textarea { min-height: 120px; resize: vertical; }

/* Validation error */
.cfm-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.15) !important;
}

/* ── Choice groups ──────────────────────────────────────────────────────── */
.cfm-radio-group,
.cfm-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cfm-choice {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
}
.cfm-choice input { width: auto !important; margin: 0 !important; }

/* ── Submit button ──────────────────────────────────────────────────────── */
.cfm-submit-row { margin-top: 8px; }
.cfm-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 2px 6px rgba(37,99,235,.35);
}
.cfm-submit-btn:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.45); }
.cfm-submit-btn:active { transform: scale(.98); }
.cfm-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ── Response messages ──────────────────────────────────────────────────── */
.cfm-response-message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.cfm-response-message.cfm-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}
.cfm-response-message.cfm-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ── reCAPTCHA ──────────────────────────────────────────────────────────── */
.cfm-recaptcha { margin-top: 8px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
    .cfm-form { padding: 20px 16px; }
    .cfm-field-half {
        display: block;
        width: 100%;
        margin-left: 0 !important;
    }
}
