/* ── Suraj Form Builder – Frontend Styles ────────────────────── */
.sfb-form-wrap {
    max-width: 640px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1e293b;
}

.sfb-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}
.sfb-message.sfb-msg-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.sfb-message.sfb-msg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.sfb-form .sfb-field {
    margin-bottom: 18px;
}

.sfb-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.sfb-req { color: #dc2626; margin-left: 2px; }
.sfb-desc { display: block; font-size: 12px; color: #6b7280; margin-top: 4px; }

.sfb-form input[type="text"],
.sfb-form input[type="email"],
.sfb-form input[type="tel"],
.sfb-form input[type="number"],
.sfb-form input[type="date"],
.sfb-form input[type="url"],
.sfb-form textarea,
.sfb-form select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.sfb-form input:focus,
.sfb-form textarea:focus,
.sfb-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.sfb-form input.sfb-invalid,
.sfb-form textarea.sfb-invalid,
.sfb-form select.sfb-invalid {
    border-color: #dc2626;
}

.sfb-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.sfb-form .sfb-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    transition: background .1s;
    color: #1e293b;
}
.sfb-form .sfb-choice:hover { background: #f1f5f9; }
.sfb-form .sfb-choice input { margin: 0; width: auto; cursor: pointer; }

/* ── Submit button ─────────────────────────────────────────────── */
.sfb-submit-row { margin-top: 8px; }
.sfb-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
}
.sfb-submit-btn:hover:not(:disabled) { background: #1d4ed8; }
.sfb-submit-btn:active:not(:disabled) { transform: scale(.98); }
.sfb-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

/* ── Error ─────────────────────────────────────────────────────── */
.sfb-error { color: #dc2626; font-size: 14px; }

/* ── Terms field ────────────────────────────────────────────────── */
.sfb-field-type-terms .sfb-terms-label {
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}
.sfb-field-type-terms .sfb-terms-label:hover { background: #f1f5f9; }
.sfb-field-type-terms input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: auto; cursor: pointer; }
.sfb-terms-link { color: #2563eb; text-decoration: underline; font-weight: 600; }
.sfb-terms-link:hover { color: #1d4ed8; }
