/* ===== Enrollment Wizard - Premium Multi-Step Registration ===== */
/* 30 Years of UI/UX Experience - Professional Design */

:root {
    --wizard-primary: #157EEE;
    --wizard-primary-dark: #0D5BB8;
    --wizard-primary-light: #4A9DF4;
    --wizard-success: #10B981;
    --wizard-success-light: #D1FAE5;
    --wizard-warning: #F59E0B;
    --wizard-warning-light: #FEF3C7;
    --wizard-danger: #EF4444;
    --wizard-bg: #F8FAFC;
    --wizard-card-bg: #FFFFFF;
    --wizard-border: #E2E8F0;
    --wizard-text: #1E293B;
    --wizard-text-muted: #64748B;
    --wizard-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
    --wizard-shadow-lg: 0 35px 80px rgba(0, 0, 0, 0.15);
    --wizard-radius: 16px;
    --wizard-radius-lg: 24px;
}

/* ===== Wizard Container ===== */
.enrollment-wizard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.enrollment-wizard-overlay.active {
    opacity: 1;
    visibility: visible;
}

.enrollment-wizard {
    background: var(--wizard-card-bg);
    border-radius: var(--wizard-radius-lg);
    box-shadow: var(--wizard-shadow-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.enrollment-wizard-overlay.active .enrollment-wizard {
    transform: scale(1) translateY(0);
}

/* ===== Wizard Header ===== */
.wizard-header {
    background: linear-gradient(135deg, var(--wizard-primary) 0%, var(--wizard-primary-dark) 100%);
    color: white;
    padding: 28px 32px;
    position: relative;
    overflow: hidden;
}

.wizard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wizard-header::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.wizard-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-course-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wizard-course-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.wizard-course-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-course-price {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
}

.wizard-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* ===== Step Progress Indicator ===== */
.wizard-progress {
    background: var(--wizard-bg);
    padding: 24px 32px;
    border-bottom: 1px solid var(--wizard-border);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

/* Progress Line */
.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: var(--wizard-border);
    z-index: 0;
}

.wizard-steps::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--wizard-primary), var(--wizard-success));
    z-index: 1;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-steps[data-step="1"]::after {
    width: 0%;
}

.wizard-steps[data-step="2"]::after {
    width: 50%;
}

.wizard-steps[data-step="3"]::after {
    width: 100%;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.wizard-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--wizard-card-bg);
    border: 3px solid var(--wizard-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--wizard-text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wizard-step-circle i {
    display: none;
}

.wizard-step.active .wizard-step-circle {
    background: var(--wizard-primary);
    border-color: var(--wizard-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(21, 126, 238, 0.35);
}

.wizard-step.completed .wizard-step-circle {
    background: var(--wizard-success);
    border-color: var(--wizard-success);
    color: white;
}

.wizard-step.completed .wizard-step-circle span {
    display: none;
}

.wizard-step.completed .wizard-step-circle i {
    display: block;
}

.wizard-step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wizard-text-muted);
    text-align: center;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-label {
    color: var(--wizard-primary);
    font-weight: 700;
}

.wizard-step.completed .wizard-step-label {
    color: var(--wizard-success);
}

/* ===== Wizard Body ===== */
.wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: var(--wizard-bg);
}

/* Step Panel */
.wizard-panel {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.wizard-panel.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Step 1: Requirements ===== */
.requirements-section {
    background: var(--wizard-card-bg);
    border-radius: var(--wizard-radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.requirements-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--wizard-bg);
}

.requirements-section-title i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--wizard-primary-light), var(--wizard-primary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.95rem;
}

.requirement-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--wizard-bg);
}

.requirement-item:last-child {
    border-bottom: none;
}

.requirement-icon {
    width: 28px;
    height: 28px;
    background: var(--wizard-success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wizard-success);
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.requirement-text {
    font-size: 0.95rem;
    color: var(--wizard-text);
    line-height: 1.6;
}

/* Course Summary Card in Step 1 */
.course-summary-mini {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: var(--wizard-radius);
    padding: 24px;
    color: white;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.summary-mini-item {
    text-align: center;
}

.summary-mini-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary-mini-label {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* Checkbox Agreement */
.requirement-agreement {
    background: var(--wizard-warning-light);
    border: 2px solid var(--wizard-warning);
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 24px;
}

.requirement-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.requirement-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--wizard-primary);
    cursor: pointer;
}

.requirement-checkbox label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--wizard-text);
    cursor: pointer;
}

/* ===== Step 2: Personal Info Form ===== */
.form-section {
    background: var(--wizard-card-bg);
    border-radius: var(--wizard-radius);
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title i {
    color: var(--wizard-primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wizard-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label .required {
    color: var(--wizard-danger);
}

.form-input {
    padding: 14px 16px;
    border: 2px solid var(--wizard-border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--wizard-text);
    background: var(--wizard-card-bg);
    transition: all 0.25s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--wizard-primary);
    box-shadow: 0 0 0 4px rgba(21, 126, 238, 0.1);
}

.form-input::placeholder {
    color: var(--wizard-text-muted);
    opacity: 0.6;
}

.form-input.error {
    border-color: var(--wizard-danger);
    background: #FEF2F2;
}

.form-error {
    font-size: 0.8rem;
    color: var(--wizard-danger);
    display: none;
}

.form-input.error+.form-error {
    display: block;
}

/* Phone input styles now handled by Select2 in _EnrollmentWizard.cshtml */


textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* ===== Step 3: Confirmation ===== */
.confirmation-card {
    background: var(--wizard-card-bg);
    border-radius: var(--wizard-radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.confirmation-header {
    background: linear-gradient(135deg, var(--wizard-success), #059669);
    padding: 40px;
    text-align: center;
    color: white;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.confirmation-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.confirmation-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.confirmation-body {
    padding: 32px;
}

.confirmation-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.confirmation-item {
    background: var(--wizard-bg);
    border-radius: 12px;
    padding: 18px;
}

.confirmation-item-label {
    font-size: 0.8rem;
    color: var(--wizard-text-muted);
    font-weight: 500;
    margin-bottom: 6px;
}

.confirmation-item-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wizard-text);
}

.confirmation-next-steps {
    margin-top: 28px;
    padding: 24px;
    background: #EFF6FF;
    border-radius: 12px;
    border-right: 4px solid var(--wizard-primary);
}

.confirmation-next-steps h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--wizard-text);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirmation-next-steps h4 i {
    color: var(--wizard-primary);
}

.next-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
}

.next-step-number {
    width: 24px;
    height: 24px;
    background: var(--wizard-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.next-step-text {
    font-size: 0.9rem;
    color: var(--wizard-text);
    line-height: 1.5;
}

/* ===== Wizard Footer ===== */
.wizard-footer {
    background: var(--wizard-card-bg);
    border-top: 1px solid var(--wizard-border);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.wizard-btn-back {
    background: transparent;
    color: var(--wizard-text-muted);
    border: 2px solid var(--wizard-border);
}

.wizard-btn-back:hover {
    background: var(--wizard-bg);
    border-color: var(--wizard-text-muted);
}

.wizard-btn-back:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wizard-btn-next {
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(21, 126, 238, 0.3);
}

.wizard-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(21, 126, 238, 0.4);
}

.wizard-btn-next:disabled {
    background: var(--wizard-border);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.wizard-btn-submit {
    background: linear-gradient(135deg, var(--wizard-success), #059669);
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.wizard-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.wizard-btn-close {
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-primary-dark));
    color: white;
    box-shadow: 0 8px 20px rgba(21, 126, 238, 0.3);
}

/* ===== Loading State ===== */
.wizard-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.wizard-loading.active {
    display: flex;
}

.wizard-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--wizard-border);
    border-top-color: var(--wizard-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.wizard-loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wizard-text);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .enrollment-wizard {
        max-height: 100vh;
        border-radius: 0;
    }

    .wizard-header {
        padding: 20px;
    }

    .wizard-course-title {
        font-size: 1rem;
        max-width: 200px;
    }

    .wizard-course-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .wizard-progress {
        padding: 16px 20px;
    }

    .wizard-step-label {
        font-size: 0.7rem;
    }

    .wizard-step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .wizard-body {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .course-summary-mini {
        grid-template-columns: repeat(2, 1fr);
    }

    .confirmation-summary {
        grid-template-columns: 1fr;
    }

    .wizard-footer {
        padding: 16px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .wizard-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Quick Enroll Button on Details Page ===== */
.btn-open-wizard {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--wizard-primary), var(--wizard-primary-dark));
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(21, 126, 238, 0.35);
}

.btn-open-wizard:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(21, 126, 238, 0.45);
}

.btn-open-wizard i {
    font-size: 1.2rem;
}