/* =====================================================
   SMARTFORM PRO BUILDER — Frontend CSS
   Styles for forms displayed on your website
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@400;500;600&family=Nunito:wght@400;600;700&display=swap');

/* ── FORM WRAPPER ─────────────────────────────────── */
.sfpb-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    box-sizing: border-box;
}

.sfpb-form-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.sfpb-form-description {
    opacity: 0.75;
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── FIELDS ───────────────────────────────────────── */
.sfpb-fields {
    display: flex;
    flex-direction: column;
}

.sfpb-field {
    margin-bottom: 20px;
}

.sfpb-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 7px;
    line-height: 1.3;
}

.sfpb-required {
    color: #e53e3e;
    margin-left: 3px;
}

/* ── INPUTS ───────────────────────────────────────── */
.sfpb-input,
.sfpb-textarea,
.sfpb-select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sfpb-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* ── CHECKBOX / RADIO ─────────────────────────────── */
.sfpb-check-label,
.sfpb-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 8px;
    cursor: pointer;
}

.sfpb-check-label input,
.sfpb-radio-label input {
    width: 17px;
    height: 17px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: currentColor;
}

/* ── FILE UPLOAD ──────────────────────────────────── */
.sfpb-file {
    display: block;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

/* ── MESSAGES ─────────────────────────────────────── */
.sfpb-error {
    display: block;
    font-size: 13px;
    margin-top: 5px;
    color: #e53e3e;
    font-weight: 500;
}

.sfpb-help {
    display: block;
    font-size: 13px;
    margin-top: 5px;
    opacity: 0.6;
}

/* ── SUBMIT BUTTON ────────────────────────────────── */
.sfpb-form-footer {
    margin-top: 8px;
}

.sfpb-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s;
}

.sfpb-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ── SUCCESS / ERROR MESSAGES ─────────────────────── */
.sfpb-form-messages {
    margin-top: 20px;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    display: none;
}

.sfpb-form-messages.success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    display: block;
}

.sfpb-form-messages.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    display: block;
}

/* ── TRACKING ID DISPLAY ──────────────────────────── */
.sfpb-form-messages code {
    background: rgba(0,0,0,0.07);
    padding: 3px 8px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 1.05em;
}

/* ── STATUS CHECKER ───────────────────────────────── */
.sfpb-status-checker {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.sfpb-status-checker h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
}

.sfpb-status-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sfpb-status-form .sfpb-input {
    flex: 1;
    min-width: 200px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
}

/* ── MULTI-STEP FORM ──────────────────────────────── */
.sfpb-step {
    display: none;
}

.sfpb-step.active {
    display: block;
}

.sfpb-step-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
}

.sfpb-step-dot {
    flex: 1;
    height: 4px;
    border-radius: 99px;
    background: #e2e8f0;
    transition: background 0.3s;
}

.sfpb-step-dot.complete {
    background: currentColor;
}

.sfpb-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 600px) {
    .sfpb-form-wrap {
        padding: 20px !important;
    }

    .sfpb-form-title {
        font-size: 20px;
    }

    .sfpb-status-form {
        flex-direction: column;
    }

    .sfpb-status-form .sfpb-input {
        min-width: 100%;
    }
}
