.vf-cfm {
    --vf-cfm-background: #ffffff;
    --vf-cfm-field-background: #f7f7f7;
    --vf-cfm-field-text: #111111;
    --vf-cfm-text: #111111;
    --vf-cfm-accent: #111111;
    --vf-cfm-button-text: #ffffff;
    --vf-cfm-radius: 8px;
    --vf-cfm-gap: 16px;
    padding: 24px;
    position: relative;
    z-index: 2;
    isolation: isolate;
    border-radius: var(--vf-cfm-radius);
    background: var(--vf-cfm-background);
    color: var(--vf-cfm-text);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.08);
}

.vf-cfm--embedded {
    padding: clamp(24px, 5vw, 56px);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.vf-cfm-intro {
    margin-bottom: 20px;
}

.vf-cfm-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--vf-cfm-gap);
}

.vf-cfm-field {
    grid-column: span 6;
}

.vf-cfm-width-50 {
    grid-column: span 3;
}

.vf-cfm-width-33 {
    grid-column: span 2;
}

.vf-cfm-label,
.vf-cfm-checkbox {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.vf-cfm-checkbox input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--vf-cfm-accent);
}

.vf-cfm-checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
}

.vf-cfm input:not([type="checkbox"]):not([type="hidden"]),
.vf-cfm textarea,
.vf-cfm select {
    width: 100%;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: var(--vf-cfm-radius);
    background: var(--vf-cfm-field-background);
    color: var(--vf-cfm-field-text) !important;
    -webkit-text-fill-color: var(--vf-cfm-field-text);
    opacity: 1;
    padding: 14px 16px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vf-cfm input::placeholder,
.vf-cfm textarea::placeholder {
    color: color-mix(in srgb, var(--vf-cfm-field-text) 58%, transparent);
    -webkit-text-fill-color: color-mix(in srgb, var(--vf-cfm-field-text) 58%, transparent);
    opacity: 1;
}

.vf-cfm input:focus,
.vf-cfm textarea:focus,
.vf-cfm select:focus {
    outline: none;
    border-color: var(--vf-cfm-accent);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.vf-cfm-help {
    margin: 8px 0 0;
    font-size: 13px;
    opacity: 0.72;
}

.vf-cfm-required {
    color: #b42d2d;
}

/* ── GDPR Consent ──────────────────────────────────── */

.vf-cfm-consent {
    margin-top: var(--vf-cfm-gap);
    padding: 14px 16px;
    border-radius: var(--vf-cfm-radius);
    background: var(--vf-cfm-field-background);
    border: 1px solid rgba(17, 17, 17, 0.06);
}

.vf-cfm-consent-label {
    margin-bottom: 0;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.5;
}

.vf-cfm-consent-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

/* ── Turnstile CAPTCHA ─────────────────────────────── */

.vf-cfm-turnstile {
    margin-top: var(--vf-cfm-gap);
    display: flex;
    justify-content: flex-start;
}

.vf-cfm-field-error {
    margin: 7px 0 0;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
}

.vf-cfm--embedded .vf-cfm-field-error {
    color: #ffffff;
}

.vf-cfm-field.has-error input,
.vf-cfm-field.has-error textarea,
.vf-cfm-field.has-error select {
    border-color: #b42318;
    box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.18);
}

.vf-cfm-privacy {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.vf-cfm-privacy p:last-child {
    margin-bottom: 0;
}

.vf-cfm-privacy a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* ── Submit Button ─────────────────────────────────── */

.vf-cfm-actions {
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.vf-cfm-submit {
    appearance: none;
    border: 0;
    border-radius: var(--vf-cfm-radius);
    background: var(--vf-cfm-accent);
    color: var(--vf-cfm-button-text);
    padding: 14px 22px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.vf-cfm-submit .vf-cfm-submit-text {
    color: var(--vf-cfm-button-text) !important;
    -webkit-text-fill-color: var(--vf-cfm-button-text);
}

.vf-cfm-submit:hover {
    opacity: 0.9;
}

.vf-cfm-submit:active {
    transform: scale(0.97);
}

.vf-cfm-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vf-cfm-submit-spinner {
    display: inline-flex;
    align-items: center;
}

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

.vf-cfm-spin {
    animation: vf-cfm-spin 0.8s linear infinite;
    transform-origin: center;
}

/* ── Status Messages ───────────────────────────────── */
.vf-cfm-status {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--vf-cfm-radius);
    font-size: 15px !important;
    font-weight: 600;
    line-height: 1.5 !important;
    opacity: 1 !important;
}

.vf-cfm-status.is-success {
    background: #e7f6ed;
    color: #14532d !important;
}

.vf-cfm-status.is-error {
    background: #feeceb;
    color: #8a1f1f !important;
}

/* ── Honeypot ──────────────────────────────────────── */

.vf-cfm-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Responsive ────────────────────────────────────── */

@media (max-width: 720px) {
    .vf-cfm {
        padding: 18px;
    }

    .vf-cfm-grid {
        grid-template-columns: 1fr;
    }

    .vf-cfm-field,
    .vf-cfm-width-50,
    .vf-cfm-width-33 {
        grid-column: span 1;
    }

    .vf-cfm-submit {
        width: 100%;
        justify-content: center;
    }
}
