/**
 * Multi-Step Form Component Styles
 *
 * Comprehensive styling for multi-step forms including:
 * - Container and layout
 * - Form sections and fields
 * - Navigation buttons
 * - Field validation and errors
 * - Animations and transitions
 */

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.multistep-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-title {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    font-weight: 700;
}

[data-theme="light"] .section-title {
    color: #333;
}

.section-icon {
    margin-right: 10px;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 500;
}

[data-theme="light"] .section-subtitle {
    color: #666;
}

.section-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

[data-theme="light"] .section-description {
    color: #777;
}

/* ============================================
   FORM FIELDS
   ============================================ */

.form-field-wrapper {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.form-field-wrapper.field-visible {
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
    font-size: 14px;
}

[data-theme="light"] .field-label {
    color: #333;
}

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

.field-help {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    line-height: 1.4;
}

[data-theme="light"] .field-help {
    color: #6c757d;
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

[data-theme="light"] .form-control {
    background: rgba(255, 255, 255, 0.9);
    border-color: #dee2e6;
    color: #333;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .form-control::placeholder {
    color: #6c757d;
}

.form-control:focus {
    border-color: #f26419;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(242, 100, 25, 0.25);
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .form-control:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(242, 100, 25, 0.15);
}

/* Select dropdown specific styling */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

[data-theme="light"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.form-select option {
    background-color: #1a1a1a;
    color: white;
    padding: 8px 12px;
}

[data-theme="light"] .form-select option {
    background-color: white;
    color: #333;
}

/* ============================================
   RADIO & CHECKBOX GROUPS
   ============================================ */

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"],
.checkbox-group input[type="checkbox"] {
    margin: 0;
    accent-color: #f26419;
}

/* ============================================
   FILE UPLOADS
   ============================================ */

.file-help {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

/* ============================================
   FIELD ERRORS & VALIDATION
   ============================================ */

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
}

/* ============================================
   CONDITIONAL FIELDS
   ============================================ */

.field-hidden {
    display: none !important;
}

.field-visible {
    display: block !important;
}

.field-highlighted {
    background-color: rgba(0, 123, 255, 0.1);
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

/* ============================================
   REFERRAL TYPE DROPDOWN (SPECIAL STYLING)
   ============================================ */

.referral-type-select {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

[data-theme="light"] .referral-type-select {
    background: rgba(242, 100, 25, 0.05) !important;
    border-color: rgba(242, 100, 25, 0.3) !important;
    color: #333 !important;
}

.referral-type-select:hover {
    border-color: #f26419 !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="light"] .referral-type-select:hover {
    background: rgba(242, 100, 25, 0.1) !important;
}

.referral-type-select:focus {
    border-color: #f26419 !important;
    box-shadow: 0 0 0 3px rgba(242, 100, 25, 0.25) !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

.referral-type-select option {
    background-color: #1a1a1a !important;
    color: white !important;
    padding: 12px 16px !important;
    font-size: 14px;
}

[data-theme="light"] .referral-type-select option {
    background-color: white !important;
    color: #333 !important;
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .form-navigation {
    border-color: #e9ecef;
}

.nav-spacer {
    flex: 1;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #f26419 0%, #f7931e 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(242, 100, 25, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e55a15 0%, #e8851a 100%);
    box-shadow: 0 6px 20px rgba(242, 100, 25, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .btn-secondary {
    background: white;
    color: #333;
    border-color: #dee2e6;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-secondary:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d9668 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.form-submit {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .form-submit {
    border-color: #e9ecef;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .multistep-form-container {
        padding: 10px;
    }

    .section-title {
        font-size: 20px;
    }

    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-control {
        padding: 10px 14px;
        font-size: 13px;
    }

    .section-title {
        font-size: 18px;
    }

    .field-label {
        font-size: 13px;
    }
}
