.wpsf-form-wrap { max-width: 680px; }
.wpsf-form { display: flex; flex-wrap: wrap; gap: 16px; }
.wpsf-field { display: flex; flex-direction: column; gap: 6px; box-sizing: border-box; --wpsf-gap: 16px; flex: 0 0 calc(var(--wpsf-w, 100) * 1% - (1 - var(--wpsf-w, 100) / 100) * var(--wpsf-gap)); max-width: 100%; }
@media ( max-width: 560px ) { .wpsf-form .wpsf-field { flex-basis: 100%; max-width: 100%; } }
.wpsf-field label { font-size: 14px; font-weight: 600; color: #111; }
.wpsf-required { color: #dc2626; margin-left: 2px; }
.wpsf-field input[type="text"],
.wpsf-field input[type="email"],
.wpsf-field input[type="tel"],
.wpsf-field input[type="number"],
.wpsf-field input[type="url"],
.wpsf-field input[type="date"],
.wpsf-field input[type="file"],
.wpsf-field textarea,
.wpsf-field select { width: 100%; padding: 10px 14px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 8px; color: #111; box-sizing: border-box; background: #fff; font-family: inherit; transition: border-color .15s, box-shadow .15s; }
.wpsf-field input:focus,
.wpsf-field textarea:focus,
.wpsf-field select:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.12); outline: none; }
.wpsf-field textarea { resize: vertical; min-height: 100px; }
.wpsf-options { display: flex; flex-direction: column; gap: 8px; }
.wpsf-option { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; cursor: pointer; }
.wpsf-option input { width: auto; margin: 0; }

/* Fancy card selector (radio/checkbox styled as option cards with a check badge) */
.wpsf-cards { display: grid; grid-template-columns: repeat(var(--wpsf-cols, 2), minmax(0, 1fr)); gap: 12px; }
.wpsf-card { position: relative; margin: 0; cursor: pointer; }
.wpsf-card-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.wpsf-card-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; padding: 12px 16px; border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fff; font-size: 14px; font-weight: 500; color: #1f2937; transition: border-color .15s, box-shadow .15s; }
.wpsf-card:hover .wpsf-card-box { border-color: #cbd5e1; }
.wpsf-card-input:checked + .wpsf-card-box { border-color: #60a5fa; box-shadow: 0 0 0 1px #60a5fa; }
.wpsf-card-input:focus-visible + .wpsf-card-box { box-shadow: 0 0 0 3px rgba(96,165,250,.35); }
.wpsf-card-text { line-height: 1.3; }
.wpsf-card-check { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #22c55e; color: #fff; opacity: 0; transform: scale(.5); transition: opacity .15s, transform .15s; }
.wpsf-card-input:checked + .wpsf-card-box .wpsf-card-check { opacity: 1; transform: scale(1); }
.wpsf-field--error .wpsf-card-box { border-color: #dc2626; }
@media (max-width: 560px) { .wpsf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wpsf-section-break { width: 100%; border-bottom: 1px solid #e5e7eb; padding-bottom: 4px; }
.wpsf-section-break h3 { font-size: 15px; font-weight: 700; color: #111; margin: 0; }
.wpsf-submit-row { width: 100%; }
.wpsf-submit { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; font-size: 15px; font-weight: 600; background: #4f46e5; color: #fff; border: none; border-radius: 8px; cursor: pointer; transition: background .15s; font-family: inherit; }
.wpsf-submit:hover { background: #4338ca; }
.wpsf-submit:disabled { opacity: .6; cursor: not-allowed; }
.wpsf-success { padding: 16px 20px; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 8px; font-size: 14px; font-weight: 500; }
.wpsf-error { padding: 12px 16px; background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; border-radius: 8px; font-size: 13px; margin-top: 8px; }
.wpsf-field--error input[type="text"],
.wpsf-field--error input[type="email"],
.wpsf-field--error input[type="tel"],
.wpsf-field--error input[type="number"],
.wpsf-field--error input[type="url"],
.wpsf-field--error input[type="date"],
.wpsf-field--error input[type="file"],
.wpsf-field--error textarea,
.wpsf-field--error select { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.wpsf-field--error input:focus,
.wpsf-field--error textarea:focus,
.wpsf-field--error select:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.wpsf-field-error-msg { font-size: 12px; color: #dc2626; margin-top: 2px; display: none; }
.wpsf-field--error .wpsf-field-error-msg { display: block; }
.wpsf-hp { display: none !important; visibility: hidden !important; }

/* ── Flow (branching multi-step) ── */
.wpsf-flow-wrap { --wpsf-accent: #6366f1; }
.wpsf-flow-progress { display: flex; align-items: flex-start; gap: 0; margin: 0 0 26px; }
.wpsf-pstep { flex: 1 1 0; text-align: center; position: relative; color: #9ca3af; font-size: 12.5px; font-weight: 600; min-width: 0; }
.wpsf-pstep::before { content: ''; position: absolute; top: 18px; left: -50%; width: 100%; height: 2px; background: #e5e7eb; z-index: 0; }
.wpsf-pstep:first-child::before { display: none; }
.wpsf-pdot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid #e5e7eb; color: #9ca3af; margin-bottom: 7px; }
.wpsf-pdot svg { width: 18px; height: 18px; }
.wpsf-plabel { display: block; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpsf-pstep.is-active, .wpsf-pstep.is-done { color: #111827; }
.wpsf-pstep.is-active .wpsf-pdot, .wpsf-pstep.is-done .wpsf-pdot { background: var(--wpsf-accent); border-color: var(--wpsf-accent); color: #fff; }
.wpsf-pstep.is-done::before, .wpsf-pstep.is-active::before { background: var(--wpsf-accent); }
.wpsf-node-h { font-size: 20px; font-weight: 800; margin: 0 0 16px; }
.wpsf-choices { display: grid; grid-template-columns: repeat(var(--wpsf-cols, 2), minmax(0, 1fr)); gap: 14px; }
@media ( max-width: 600px ) { .wpsf-choices { grid-template-columns: 1fr 1fr; } }
@media ( max-width: 400px ) { .wpsf-choices { grid-template-columns: 1fr; } }
.wpsf-choice { text-align: left; background: #fff; border: 2px solid #e5e7eb; border-radius: 14px; padding: 18px 20px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, box-shadow .15s, transform .12s; }
.wpsf-choice:hover { border-color: var(--wpsf-accent); transform: translateY(-1px); }
.wpsf-choice.is-active { border-color: var(--wpsf-accent); box-shadow: 0 3px 12px rgba(99,102,241,.18); }
.wpsf-choice-label { font-weight: 700; font-size: 16px; color: #111827; }
.wpsf-choice-desc { font-size: 13px; color: #6b7280; }
.wpsf-node-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wpsf-node-fields .wpsf-field--full, .wpsf-node-fields .wpsf-field { grid-column: 1 / -1; max-width: none; }
.wpsf-node-fields .wpsf-field--half { grid-column: span 1; }
@media ( max-width: 560px ) { .wpsf-node-fields { grid-template-columns: 1fr; } }
.wpsf-field.wpsf-has-error input, .wpsf-field.wpsf-has-error select, .wpsf-field.wpsf-has-error textarea { border-color: #dc2626 !important; }
.wpsf-flow-nav { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.wpsf-flow-back { background: #eef0f4; border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; cursor: pointer; color: #374151; }
.wpsf-flow-next, .wpsf-flow-submit { margin-left: auto; background: var(--wpsf-accent); color: #fff; border: 0; border-radius: 10px; padding: 12px 22px; font-weight: 700; cursor: pointer; }
.wpsf-flow-next:hover, .wpsf-flow-submit:hover { filter: brightness(1.06); }
.wpsf-flow-nav [hidden] { display: none !important; }
