/* =============================================================
   Widder Forms — shared styles for contact + newsletter widgets
   ============================================================= */

.widder-form-card {
    --wf-text: #0a0a0a;
    --wf-muted: #8e8e8e;
    --wf-border: #e5e5e5;
    --wf-green: #95c11f;
    --wf-green-hover: #84ad1a;
    --wf-red: #c8102e;
    --wf-ok: #2a8a2a;

    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: var(--wf-text);
    background: #fff;
    border-radius: 32px;
    padding: 40px 32px;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
    box-sizing: border-box;
}
.widder-form-card.is-newsletter {
    max-width: 380px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
.widder-form-card *,
.widder-form-card *::before,
.widder-form-card *::after { box-sizing: border-box; }

.widder-form-heading {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 28px;
    color: inherit;
}
.widder-form-card.is-newsletter .widder-form-heading {
    font-size: 22px;
    margin: 0 0 10px;
}
.widder-form-intro {
    font-size: 14px;
    line-height: 1.5;
    color: var(--wf-muted);
    margin: 0 0 16px;
}

.widder-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.widder-form-card.is-newsletter .widder-form { gap: 10px; }

.wf-field { position: relative; margin: 0; }

.wf-field input,
.wf-field select,
.wf-field textarea {
    width: 100%;
    border: 1px solid var(--wf-border);
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    color: var(--wf-text);
    padding: 18px 24px;
    border-radius: 999px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.widder-form-card.is-newsletter .wf-field input { padding: 14px 20px; font-size: 14px; }

.wf-field textarea {
    border-radius: 28px;
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}
.wf-field input:focus,
.wf-field select:focus,
.wf-field textarea:focus {
    border-color: var(--wf-text);
    box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}
.wf-field input::placeholder,
.wf-field textarea::placeholder { color: var(--wf-muted); }

/* Custom select chevron */
.wf-field.wf-select::after {
    content: "";
    position: absolute;
    right: 28px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--wf-text);
    border-bottom: 2px solid var(--wf-text);
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}
.wf-field select { cursor: pointer; color: var(--wf-muted); padding-right: 48px; }
.wf-field select.has-value { color: var(--wf-text); }

/* Newsletter consent checkbox */
.wn-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.45;
    color: inherit;
    cursor: pointer;
    padding: 4px 0;
}
.wn-consent input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--wf-green);
}

/* Honeypot */
.wf-hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Math captcha — full version (contact) */
.wf-captcha {
    margin-top: 4px;
    padding: 16px 24px;
    border: 1px solid var(--wf-border);
    border-radius: 28px;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--wf-text);
}
.wf-captcha-q { font-size: 14px; font-weight: 500; }
.wf-captcha-q strong { font-weight: 700; }
.wf-captcha-iw { display: flex; align-items: center; gap: 10px; }
.wf-captcha-input {
    width: 90px !important;
    padding: 10px 16px !important;
    text-align: center;
    border-radius: 999px !important;
}
.wf-captcha-status { font-size: 13px; font-weight: 600; min-width: 80px; }
.wf-captcha-status.ok  { color: var(--wf-ok); }
.wf-captcha-status.err { color: var(--wf-red); }

/* Math captcha — compact version (newsletter) */
.wf-captcha.wf-captcha-compact {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    flex-wrap: nowrap;
}
.wf-captcha.wf-captcha-compact .wf-captcha-q { flex: 1; }
.wf-captcha.wf-captcha-compact .wf-captcha-input {
    width: 60px !important;
    padding: 6px 10px !important;
    font-size: 13px;
}
.wf-captcha.wf-captcha-compact .wf-captcha-status {
    width: 16px;
    min-width: 16px;
    font-size: 12px;
    text-align: center;
}

/* Submit button */
.wf-submit {
    margin-top: 14px;
    border: 0;
    background: var(--wf-green);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    padding: 18px 24px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
    width: 100%;
}
.widder-form-card.is-newsletter .wf-submit {
    margin-top: 4px;
    font-size: 15px;
    padding: 14px 24px;
}
.wf-submit:hover { background: var(--wf-green-hover); }
.wf-submit:active { transform: scale(0.995); }
.wf-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Toast / status */
.wf-toast {
    margin-top: 18px;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    line-height: 1.4;
}
.wf-toast.wf-show { display: block; }
.wf-toast.wf-ok {
    background: rgba(149,193,31,0.12);
    color: #4a6a0e;
    border: 1px solid rgba(149,193,31,0.4);
}
.wf-toast.wf-err {
    background: rgba(200,16,46,0.08);
    color: var(--wf-red);
    border: 1px solid rgba(200,16,46,0.3);
}
.widder-form-card.is-newsletter .wf-toast {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
}

@media (max-width: 480px) {
    .widder-form-card { padding: 28px 20px; border-radius: 24px; }
    .widder-form-card.is-newsletter { padding: 0; border-radius: 0; }
    .wf-captcha:not(.wf-captcha-compact) {
        flex-direction: column;
        align-items: stretch;
    }
    .wf-captcha:not(.wf-captcha-compact) .wf-captcha-iw {
        justify-content: space-between;
    }
}
