/* Smart Forms Builder - Frontend Styles */
.sfb-form-container {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    max-width: 680px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.sfb-form-container.sfb-rtl { direction: rtl; text-align: right; }

.sfb-form-description {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.7;
}

.sfb-progress-bar {
    height: 6px;
    background: #e8e8ef;
    border-radius: 3px;
    margin-bottom: .5rem;
    overflow: hidden;
}

.sfb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width .3s ease;
}

.sfb-progress-text {
    font-size: .85rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.sfb-field {
    margin-bottom: 1.25rem;
}

.sfb-label {
    display: block;
    font-weight: 600;
    margin-bottom: .5rem;
    color: #333;
}

.sfb-required { color: #e53935; margin-right: 2px; }

.sfb-field-desc {
    font-size: .85rem;
    color: #888;
    margin: -.25rem 0 .5rem;
}

.sfb-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #dde1e8;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    box-sizing: border-box;
}

.sfb-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.sfb-textarea { min-height: 120px; resize: vertical; }

.sfb-choice-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 0;
    cursor: pointer;
}

.sfb-scale {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.sfb-scale-btn {
    width: 40px;
    height: 40px;
    border: 1.5px solid #dde1e8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all .15s;
}

.sfb-scale-btn:hover,
.sfb-scale-btn.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.sfb-emoji-rating { display: flex; gap: .75rem; }

.sfb-emoji-btn {
    font-size: 1.75rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    padding: .25rem;
    transition: transform .15s;
}

.sfb-emoji-btn:hover { transform: scale(1.2); }
.sfb-emoji-btn.active { border-color: #667eea; }

.sfb-slider { width: 100%; }

.sfb-heading { margin: 1rem 0 .5rem; color: #1a1a2e; }
.sfb-divider { border: none; border-top: 1px solid #e8e8ef; margin: 1.5rem 0; }

.sfb-form-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.sfb-btn {
    padding: .75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
}

.sfb-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.sfb-btn-primary:hover { opacity: .9; transform: translateY(-1px); }

.sfb-btn-secondary {
    background: #f0f0f5;
    color: #333;
}

.sfb-btn-outline {
    background: transparent;
    border: 1.5px solid #667eea;
    color: #667eea;
}

.sfb-field-error {
    color: #e53935;
    font-size: .85rem;
    margin-top: .25rem;
    display: block;
}

.sfb-field.has-error .sfb-input { border-color: #e53935; }

.sfb-form-message {
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
}

.sfb-form-message.success { background: #e8f5e9; color: #2e7d32; }
.sfb-form-message.error { background: #ffebee; color: #c62828; }

.sfb-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

.sfb-page-hidden { display: none; }

.sfb-error { color: #e53935; text-align: center; }

/* Dark mode */
.sfb-dark {
    --sfb-bg: #1a1a2e;
    --sfb-card: #252540;
    --sfb-text: #e8e8ef;
    --sfb-border: #3a3a5c;
}

.sfb-dark .sfb-input { background: var(--sfb-card); color: var(--sfb-text); border-color: var(--sfb-border); }
.sfb-dark .sfb-label { color: var(--sfb-text); }

/* Loading */
.sfb-loading { opacity: .6; pointer-events: none; }

@media (max-width: 600px) {
    .sfb-form-actions { flex-direction: column; }
    .sfb-btn { width: 100%; text-align: center; }
}
