/* Multi-Step Form Frontend Styles */

.msf-form-container {
    max-width: 600px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Form Steps */
.msf-form-steps {
    min-height: 300px;
}

.msf-form-step {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msf-form-step h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    line-height: 1.4;
}

/* Form Fields */
.msf-form-field {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.msf-form-field:focus {
    outline: none;
    border-color: #6c0a00;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background-color: #f8fbfe;
}

textarea.msf-form-field {
    resize: vertical;
    min-height: 100px;
}

/* Yes/No Options */
.msf-yes-no-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.msf-yes-no-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.msf-yes-no-options label:hover {
    background-color: #f0f0f0;
}

.msf-yes-no-options input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Dropdown */
.msf-dropdown-field {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
    line-height: 1.5;
}

.msf-dropdown-field:hover {
    border-color: #2980b9;
}

/* Multiple Choice Options */
.msf-multiple-choice-options,
.msf-checkbox-options {
    margin: 20px 0;
}

.msf-multiple-choice-options label,
.msf-checkbox-options label {
    display: flex;
    align-items: center;
    margin: 15px 0;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.msf-multiple-choice-options label:hover,
.msf-checkbox-options label:hover {
    background-color: #f0f0f0;
}

.msf-multiple-choice-options input[type="radio"],
.msf-checkbox-options input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Email Step */
.msf-email-step input[type="email"] {
    width: 100%;
}

/* Navigation Buttons */
.msf-form-navigation {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: space-between;
}

.msf-btn-prev,
.msf-btn-next,
.msf-btn-submit {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.msf-btn-prev {
    background-color: #e0e0e0;
    color: #333;
}

.msf-btn-prev:hover {
    background-color: #ccc;
}

.msf-btn-next,
.msf-btn-submit {
    background-color: #6c0a00;
    color: white;
    min-width: 120px;
}

.msf-btn-next:hover,
.msf-btn-submit:hover {
    background-color: #300601;
}

.msf-btn-next:disabled,
.msf-btn-submit:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Progress Bar */
.msf-progress {
    margin-top: 20px;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.msf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6c0a00, #6c0a00);
    transition: width 0.5s ease;
    border-radius: 3px;
}

/* Conditional logic: question blocks hidden by show/hide rules */
.msf-form-question-block {
    overflow: hidden; /* keeps slideDown smooth */
}

.msf-form-question-block.msf-hidden-by-logic {
    display: none;
}

/* Field-level validation error */
.msf-form-field.msf-field-error,
.msf-form-field.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* Form Notice */
.msf-form-notice {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    color: #856404;
}

/* Success Message */
.msf-form-success {
    background-color: #d4edda;
    border: 1px solid #28a745;
    border-radius: 4px;
    padding: 15px;
    color: #155724;
    margin-bottom: 20px;
}

.msf-form-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    color: #721c24;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .msf-form-container {
        padding: 20px;
        margin: 20px 10px;
    }

    .msf-form-step h3 {
        font-size: 18px;
    }

    .msf-form-navigation {
        flex-direction: column;
    }

    .msf-btn-prev,
    .msf-btn-next,
    .msf-btn-submit {
        width: 100%;
    }

    .msf-yes-no-options {
        flex-direction: column;
        gap: 10px;
    }

    .msf-yes-no-options label {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Animation for transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}
