/* ─── Onboarding Wizard Overlay ─── */
#onboardingWizardOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

#onboardingWizardOverlay.active {
    display: flex;
}

/* ─── Congratulations Screen ─── */
.wiz-congrats {
    text-align: center;
    max-width: 480px;
    padding: 48px 40px;
    background: linear-gradient(135deg, rgba(30, 32, 44, 0.98), rgba(24, 26, 38, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    animation: wizFadeIn 0.4s ease;
}

.wiz-congrats-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: wizBounce 0.6s ease 0.3s both;
}

.wiz-congrats h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.wiz-congrats p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.5;
}

.wiz-congrats .wiz-sub {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 28px;
}

/* ─── Wizard Modal (fixed height) ─── */
.wiz-modal {
    width: 600px;
    max-width: 95vw;
    height: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(30, 32, 44, 0.98), rgba(24, 26, 38, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    animation: wizFadeIn 0.3s ease;
    overflow: hidden;
}

.wiz-header {
    padding: 20px 28px 0;
    flex-shrink: 0;
}

.wiz-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.wiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.wiz-step-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wiz-step-label i {
    color: rgba(99, 102, 241, 0.6);
    font-size: 10px;
}

.wiz-title-row {
    padding: 16px 28px 0;
    flex-shrink: 0;
}

.wiz-title-row h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.wiz-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    margin: 8px 28px 0;
    line-height: 1.6;
    flex-shrink: 0;
}

.wiz-body {
    padding: 24px 28px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Scrollbar styling for body */
.wiz-body::-webkit-scrollbar {
    width: 6px;
}

.wiz-body::-webkit-scrollbar-track {
    background: transparent;
}

.wiz-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.wiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px 24px;
    gap: 12px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.wiz-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wiz-enter-hint {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wiz-enter-hint kbd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: inherit;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ─── Buttons ─── */
.wiz-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.wiz-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    width: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.wiz-btn-primary:hover::before {
    left: 100%;
}

.wiz-btn-primary:hover {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.wiz-btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wiz-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.wiz-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #fff;
    border-color: rgba(99, 102, 241, 0.3);
}

/* ─── Form Elements ─── */
.wiz-field {
    margin-bottom: 20px;
}

.wiz-field:last-child {
    margin-bottom: 0;
}

.wiz-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
}

.wiz-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 10px;
    line-height: 1.5;
}

.wiz-select,
.wiz-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 10, 30, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.wiz-select:focus,
.wiz-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wiz-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.wiz-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 10, 30, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    transition: all 0.3s;
    box-sizing: border-box;
}

.wiz-textarea:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ─── Language Quick Picks (single line) ─── */
.wiz-lang-picks {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: center;
    margin-bottom: 12px;
}

.wiz-lang-pick {
    padding: 8px 14px;
    background: rgba(10, 10, 30, 0.4);
    border: 1px solid rgba(60, 60, 130, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.wiz-lang-pick:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.wiz-lang-pick.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.06));
    color: #fff;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
}

/* ─── Toggle Row (Multilingual + Recording) ─── */
.wiz-toggle-row {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wiz-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
}

.wiz-toggle-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wiz-toggle-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.wiz-toggle-info strong {
    display: block;
    color: #fff;
    font-size: 14px;
    margin-bottom: 2px;
}

.wiz-toggle-desc {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
}

/* ─── Toggle Switch ─── */
.wiz-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.wiz-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wiz-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: all 0.3s;
}

.wiz-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
}

.wiz-switch input:checked+.wiz-switch-slider {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.wiz-switch input:checked+.wiz-switch-slider::before {
    transform: translateX(20px);
}

/* ─── Auto Language Callout (kept for compatibility) ─── */
.wiz-auto-lang-callout {
    margin-top: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.wiz-auto-lang-callout strong {
    color: #fff;
}

.wiz-callout-icon {
    font-size: 28px;
    flex-shrink: 0;
}

/* ─── Day Toggles ─── */
.wiz-weekday-grid {
    display: flex;
    gap: 8px;
}

.wiz-day-toggle {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 30, 0.5);
    border: 1px solid rgba(60, 60, 130, 0.3);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
}

.wiz-day-toggle.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2), 0 4px 15px rgba(99, 102, 241, 0.3);
}

.wiz-day-toggle:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

/* ─── Time Row ─── */
.wiz-time-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 16px;
}

.wiz-time-row>.wiz-field {
    flex: 1;
    margin-bottom: 0;
}

.wiz-time-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    padding-top: 24px;
}

/* ─── Sliders ─── */
.wiz-slider-group {
    margin-bottom: 28px;
}

.wiz-slider-group:last-child {
    margin-bottom: 0;
}

.wiz-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wiz-slider-header label {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.wiz-slider-value {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wiz-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.15));
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.wiz-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    cursor: pointer;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.5), 0 0 40px rgba(34, 211, 238, 0.2);
    transition: box-shadow 0.2s;
}

.wiz-range::-webkit-slider-thumb:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.7), 0 0 50px rgba(34, 211, 238, 0.3);
}

.wiz-slider-desc {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(139, 92, 246, 0.85);
    font-style: italic;
}

/* ─── Choice Cards (Transfer Yes/No) ─── */
.wiz-choice-cards {
    display: flex;
    gap: 16px;
}

.wiz-choice-card {
    flex: 1;
    padding: 28px 20px;
    background: rgba(10, 10, 30, 0.5);
    border: 2px solid rgba(60, 60, 130, 0.3);
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.wiz-choice-card i {
    font-size: 28px;
    color: rgba(139, 92, 246, 0.7);
    margin-bottom: 12px;
    display: block;
}

.wiz-choice-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.wiz-choice-card.selected {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.06));
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.wiz-choice-card.selected i {
    color: #818cf8;
}

.wiz-choice-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.wiz-choice-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.wiz-dept-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.wiz-dept-row .wiz-input {
    flex: 1;
}

/* ─── Tool Grid ─── */
.wiz-tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wiz-tool-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(10, 10, 30, 0.4);
    border: 1px solid rgba(60, 60, 130, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.wiz-tool-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.wiz-tool-item.selected {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 211, 238, 0.04));
}

.wiz-tool-check {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
    font-size: 11px;
    color: transparent;
    margin-top: 2px;
}

.wiz-tool-item.selected .wiz-tool-check {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

.wiz-tool-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px;
}

.wiz-tool-info p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.4;
}

/* ─── Completion Step ─── */
.wiz-complete-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 8px;
}

.wiz-complete-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.wiz-complete-icon i {
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wiz-complete-phone-card {
    width: 100%;
    max-width: 360px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.06));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 16px;
    margin-bottom: 20px;
}

.wiz-complete-phone-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 10px;
    font-weight: 600;
}

.wiz-complete-phone-number {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.wiz-complete-phone-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ─── Complete Note ─── */
.wiz-complete-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    margin-top: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    width: 100%;
    max-width: 360px;
    text-align: left;
    box-sizing: border-box;
}

.wiz-complete-note i {
    color: #6366f1;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ─── Animations ─── */
@keyframes wizFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes wizBounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .wiz-weekday-grid {
        flex-wrap: wrap;
    }

    .wiz-day-toggle {
        width: 46px;
        height: 46px;
        font-size: 12px;
    }

    .wiz-tool-grid {
        grid-template-columns: 1fr;
    }

    .wiz-choice-cards {
        flex-direction: column;
    }

    .wiz-time-row {
        flex-direction: column;
    }

    .wiz-time-sep {
        display: none;
    }

    .wiz-dept-row {
        flex-direction: column;
    }

    .wiz-lang-picks {
        flex-wrap: wrap;
        justify-content: center;
    }
}