/* ============================================
   Expert Registration Wizard - Professional CSS
   Khabeer Platform - Navy/Gold Theme
   ============================================ */

/* ---- Wizard Step Indicator ---- */
.wizard-progress {
    padding: 0 10px;
}

.step-indicator {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
}

.step-item {
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Connector line between steps */
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 25px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: -1;
    transition: background 0.4s ease;
}

.step-item.completed:not(:last-child)::after {
    background: #10b981;
}

.step-item.active:not(:last-child)::after {
    background: linear-gradient(90deg, #0b1a2a 50%, #e9ecef 50%);
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin: 0 auto 10px;
    border: 2px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.step-item.active .step-icon {
    background: linear-gradient(135deg, #0b1a2a, #173656);
    color: white;
    border-color: #0b1a2a;
    box-shadow: 0 4px 15px rgba(11, 26, 42, 0.3);
    transform: scale(1.05);
}

.step-item.completed .step-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.step-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #9ca3af;
    transition: color 0.3s;
}

.step-item.active .step-text {
    color: #0b1a2a;
    font-weight: 700;
}

.step-item.completed .step-text {
    color: #10b981;
}

/* ---- Wizard Step Animation ---- */
.wizard-step {
    animation: kh-fadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes kh-fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Step Titles ---- */
.wizard-step h4 {
    color: #173656;
    font-weight: 800;
    font-size: 1.3rem;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(184, 138, 74, 0.15);
    margin-bottom: 24px;
}

.wizard-step h6 {
    color: #0b1a2a;
    font-weight: 700;
    font-size: 1rem;
}

/* ---- Form Controls ---- */
.wizard-step .form-control,
.wizard-step .form-select {
    height: 48px;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    background: #fafbfc;
    transition: all 0.3s ease;
    font-family: 'Almarai', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.wizard-step .form-control:focus,
.wizard-step .form-select:focus {
    border-color: #B88A4A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184, 138, 74, 0.1);
    outline: none;
}

.wizard-step .form-control[readonly] {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.wizard-step .form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* File input */
.wizard-step input[type="file"].form-control {
    padding: 10px 16px;
    height: auto;
    cursor: pointer;
    line-height: 1.5;
}

.wizard-step input[type="file"].form-control::file-selector-button {
    background: linear-gradient(135deg, #0b1a2a, #173656);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    margin-left: 12px;
    cursor: pointer;
    font-family: 'Almarai', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.wizard-step input[type="file"].form-control::file-selector-button:hover {
    background: #B88A4A;
}

/* ---- Labels ---- */
.wizard-step .form-label-custom,
.wizard-step .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: block;
    margin-bottom: 6px;
}

/* ---- Select2 Overrides (matching the theme) ---- */
.wizard-step .select2-container .select2-selection--single {
    height: 48px !important;
    border: 1px solid #dce1e8 !important;
    border-radius: 10px !important;
    background: #fafbfc !important;
    padding: 0 !important;
    transition: all 0.3s ease;
}

.wizard-step .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px !important;
    padding-right: 16px !important;
    padding-left: 30px !important;
    color: #2c3e50 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

.wizard-step .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    left: 8px !important;
    right: auto !important;
}

.wizard-step .select2-container .select2-selection--multiple {
    min-height: 48px !important;
    border: 1px solid #dce1e8 !important;
    border-radius: 10px !important;
    background: #fafbfc !important;
    padding: 4px 12px !important;
}

.wizard-step .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, rgba(11, 26, 42, 0.06), rgba(184, 138, 74, 0.08)) !important;
    border: 1px solid rgba(184, 138, 74, 0.2) !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 0.88rem !important;
    color: #0b1a2a !important;
    font-weight: 600 !important;
}

.wizard-step .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #B88A4A !important;
    margin-left: 6px !important;
}

/* Select2 dropdown */
.select2-dropdown {
    border: 1px solid #dce1e8 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
}

.select2-results__option--highlighted[aria-selected] {
    background: linear-gradient(135deg, #0b1a2a, #173656) !important;
    color: white !important;
}

.select2-search__field {
    border: 1px solid #dce1e8 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-family: 'Almarai', sans-serif !important;
}

/* Focus state for Select2 */
.wizard-step .select2-container--default.select2-container--focus .select2-selection--single,
.wizard-step .select2-container--default.select2-container--focus .select2-selection--multiple,
.wizard-step .select2-container--default.select2-container--open .select2-selection--single,
.wizard-step .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #B88A4A !important;
    box-shadow: 0 0 0 3px rgba(184, 138, 74, 0.1) !important;
}

/* ---- Dynamic Rows (Experience / Research) ---- */
.dynamic-row {
    background: #f8fafc;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    animation: kh-fadeIn 0.3s ease;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.dynamic-row:hover {
    border-color: rgba(184, 138, 74, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.remove-dynamic-row {
    position: absolute;
    top: 12px;
    left: 14px;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    transition: all 0.3s;
}

.remove-dynamic-row:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Inputs inside dynamic rows */
.dynamic-row .form-control {
    height: 44px;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ---- Buttons ---- */
.wizard-step .btn-primary-custom {
    background: linear-gradient(135deg, #0b1a2a, #173656);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(11, 26, 42, 0.2);
}

.wizard-step .btn-primary-custom:hover {
    background: linear-gradient(135deg, #B88A4A, #d4a95a);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 138, 74, 0.3);
}

.wizard-step .btn-outline-secondary {
    border: 1px solid #dce1e8;
    color: #64748b;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s;
    background: transparent;
}

.wizard-step .btn-outline-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0b1a2a;
}

.wizard-step .btn-outline-primary {
    border: 1px dashed #B88A4A;
    color: #B88A4A;
    border-radius: 10px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s;
    background: transparent;
}

.wizard-step .btn-outline-primary:hover {
    background: rgba(184, 138, 74, 0.08);
    border-style: solid;
    border-color: #B88A4A;
    color: #B88A4A;
}

.wizard-step .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 10px;
    padding: 14px 30px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.3s;
}

.wizard-step .btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.wizard-step .btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Certificate Section Background ---- */
.wizard-step .bg-light {
    background: rgba(248, 250, 252, 0.8) !important;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
}

/* ---- Checkbox ---- */
.wizard-step input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #B88A4A;
    cursor: pointer;
    border-radius: 4px;
}

/* ---- Password Input Group ---- */
.wizard-step .input-group .form-control {
    border-radius: 0 10px 10px 0 !important;
}

.wizard-step .input-group .btn-outline-secondary {
    border-radius: 10px 0 0 10px !important;
    border: 1px solid #dce1e8;
    padding: 0 14px;
}

/* ---- intl-tel-input overrides ---- */
.iti {
    width: 100%;
    display: block;
    direction: ltr !important;
}

.iti__flag-container {
    left: 0 !important;
    right: auto !important;
}

.iti input.phone-input {
    padding-left: 90px !important;
    padding-right: 16px !important;
    text-align: right !important;
    direction: ltr !important;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #dce1e8;
    background: #fafbfc;
    font-size: 0.95rem;
}

.iti input.phone-input:focus {
    border-color: #B88A4A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184, 138, 74, 0.1);
}

.iti__selected-dial-code {
    direction: ltr !important;
    display: inline-block;
}

.iti__country-list {
    direction: ltr !important;
    text-align: left !important;
    min-width: 120px !important;
    width: max-content !important;
    white-space: nowrap !important;
    overflow-x: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 9999 !important;
}

.iti__country {
    display: flex !important;
    align-items: center;
    padding: 10px 15px 10px 25px !important;
    border-bottom: 1px solid #f1f5f9;
}

.iti__flag-box {
    margin-right: 12px !important;
    margin-left: 0 !important;
}

.iti__country-name {
    display: none !important;
}

.iti__dial-code {
    color: #B88A4A !important;
    font-weight: bold;
    direction: ltr !important;
}

/* ---- Password Strength Meter ---- */
.password-meter-wrapper {
    margin-top: 8px;
}

.password-strength-container {
    height: 5px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background 0.3s;
    border-radius: 5px;
}

.password-strength-text {
    font-size: 0.78rem;
    text-align: left;
    margin-top: 4px;
}

/* ---- Card Container ---- */
.expert-wizard-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.expert-wizard-card .card-body {
    padding: 2rem 2.5rem;
}

/* ---- Hero Header ---- */
.expert-wizard-hero {
    padding-top: 130px;
    min-height: 100vh;
    position: relative;
}

.expert-wizard-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(11, 26, 42, 0.85) 0%, rgba(11, 26, 42, 0.98) 100%);
}

.expert-wizard-hero .hero-title {
    color: white;
    font-weight: 800;
}

.expert-wizard-hero .hero-title span {
    color: #B88A4A;
}

.expert-wizard-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.5);
}

.expert-wizard-hero .back-link {
    font-size: 0.95rem;
    border-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.expert-wizard-hero .back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ---- Responsive (Mobile) ---- */
@media (max-width: 768px) {
    /* Steps indicator: compact on mobile */
    .step-indicator {
        gap: 0;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .step-text {
        font-size: 0.7rem;
    }

    .step-item:not(:last-child)::after {
        top: 20px;
    }

    /* Card */
    .expert-wizard-card .card-body {
        padding: 1.25rem 1rem;
    }

    /* Form controls */
    .wizard-step .form-control,
    .wizard-step .form-select {
        height: 44px;
        font-size: 0.9rem;
        border-radius: 8px;
        padding: 8px 12px;
    }

    .wizard-step .select2-container .select2-selection--single {
        height: 44px !important;
        border-radius: 8px !important;
    }

    .wizard-step .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 42px !important;
        font-size: 0.9rem !important;
    }

    .wizard-step .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 42px !important;
    }

    .wizard-step .select2-container .select2-selection--multiple {
        min-height: 44px !important;
        border-radius: 8px !important;
    }

    .wizard-step .iti input.phone-input {
        height: 44px;
        border-radius: 8px;
    }

    /* Buttons */
    .wizard-step .btn-primary-custom,
    .wizard-step .btn-outline-secondary,
    .wizard-step .btn-success {
        padding: 10px 20px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    /* Dynamic rows */
    .dynamic-row {
        padding: 14px;
        border-radius: 10px;
    }

    .dynamic-row .form-control {
        height: 40px;
        font-size: 0.85rem;
    }

    /* Step heading */
    .wizard-step h4 {
        font-size: 1.1rem;
    }

    .wizard-step h6 {
        font-size: 0.9rem;
    }

    /* Hero */
    .expert-wizard-hero {
        padding-top: 100px;
    }

    .expert-wizard-hero .hero-title {
        font-size: 1.5rem !important;
    }

    /* File input */
    .wizard-step input[type="file"].form-control::file-selector-button {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .step-text {
        font-size: 0.6rem;
    }

    .step-icon {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .step-item:not(:last-child)::after {
        top: 18px;
    }

    .expert-wizard-card .card-body {
        padding: 1rem 0.75rem;
    }
}
