/* ===== PHANTRIUM PROJECT WIZARD ===== */

/* --- Overlay --- */
.wizard-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-dark, #0f1419);
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wizard-overlay.open {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.wizard-overlay.closing {
    opacity: 0;
}

/* --- Header / Progress Bar --- */
.wizard-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-dark, #0f1419);
    border-bottom: 1px solid rgba(96, 165, 250, 0.15);
    padding: 16px 24px;
}

.wizard-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wizard-logo {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.wizard-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-close:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.wizard-close svg {
    width: 20px;
    height: 20px;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wizard-progress::-webkit-scrollbar {
    display: none;
}

.wizard-step-indicator {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.wizard-step-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.15);
    color: var(--text-secondary, #94a3b8);
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wizard-step-dot.active {
    border-color: var(--primary, #60a5fa);
    background: var(--primary, #60a5fa);
    color: #fff;
    box-shadow: 0 0 16px rgba(96, 165, 250, 0.4);
}

.wizard-step-dot.completed {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
}

.wizard-step-dot.completed::after {
    content: '\2713';
    font-size: 14px;
}

.wizard-step-dot.completed span {
    display: none;
}

.wizard-step-line {
    width: 24px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.wizard-step-line.completed {
    background: #10b981;
}

/* --- Main Body Layout --- */
.wizard-body {
    display: flex;
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
    gap: 32px;
}

/* Left column: step content */
.wizard-content {
    flex: 1;
    min-width: 0;
}

/* Step Transition */
.wizard-step-content {
    animation: wizardSlideIn 0.35s ease-out;
}

@keyframes wizardSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.wizard-step-content.slide-out {
    animation: wizardSlideOut 0.25s ease-in forwards;
}

@keyframes wizardSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-30px); }
}

/* Step Title */
.wizard-step-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 6px;
}

.wizard-step-subtitle {
    font-size: 15px;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 28px;
}

/* --- Clickable Cards Grid --- */
.wizard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.wizard-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 20px;
    border-radius: 14px;
    border: 2px solid rgba(255,255,255,0.08);
    background: var(--bg-card, #1a1f2e);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.wizard-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    background: var(--bg-card-hover, #242d3d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.wizard-card.selected {
    border-color: var(--primary, #60a5fa);
    background: rgba(96, 165, 250, 0.08);
    box-shadow: 0 0 0 1px var(--primary, #60a5fa), 0 8px 24px rgba(96, 165, 250, 0.15);
}

.wizard-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(167,139,250,0.15));
}

.wizard-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.wizard-card-desc {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
}

.wizard-card-price {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card check indicator */
.wizard-card-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
    color: transparent;
}

.wizard-card.selected .wizard-card-check {
    border-color: var(--primary, #60a5fa);
    background: var(--primary, #60a5fa);
    color: #fff;
}

/* --- Extra Toggle Cards --- */
.wizard-extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.wizard-extra-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.08);
    background: var(--bg-card, #1a1f2e);
    cursor: pointer;
    transition: all 0.25s ease;
}

.wizard-extra-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    background: var(--bg-card-hover, #242d3d);
}

.wizard-extra-card.selected {
    border-color: var(--primary, #60a5fa);
    background: rgba(96, 165, 250, 0.08);
}

.wizard-extra-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-size: 12px;
    color: transparent;
}

.wizard-extra-card.selected .wizard-extra-check {
    border-color: var(--primary, #60a5fa);
    background: var(--primary, #60a5fa);
    color: #fff;
}

.wizard-extra-info {
    flex: 1;
    min-width: 0;
}

.wizard-extra-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.wizard-extra-desc {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
    margin-top: 2px;
}

.wizard-extra-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

/* --- Right column: Price Sidebar --- */
.wizard-sidebar {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 110px;
    align-self: flex-start;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}

.wizard-price-box {
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.15);
    background: var(--bg-card, #1a1f2e);
    padding: 24px;
}

.wizard-price-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-price-title::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
}

.wizard-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wizard-price-row:last-of-type {
    border-bottom: none;
}

.wizard-price-row .price-val {
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.wizard-price-extras-list {
    margin: 8px 0;
}

.wizard-price-extra-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
}

.wizard-price-extra-item .price-val {
    color: #60a5fa;
    font-weight: 500;
}

.wizard-price-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,0.3), transparent);
    margin: 16px 0;
}

.wizard-price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
    font-size: 20px;
    font-weight: 700;
}

.wizard-price-total .label {
    color: var(--text-primary, #f1f5f9);
}

.wizard-price-total .amount {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wizard-price-savings {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.wizard-price-deposit {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 13px;
    text-align: center;
}

.wizard-price-deposit .label {
    color: #fbbf24;
    font-weight: 500;
}

.wizard-price-deposit .amount {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    margin-top: 2px;
}

/* --- Form Fields (Steps 5, 6) --- */
.wizard-form-group {
    margin-bottom: 18px;
}

.wizard-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wizard-form-input,
.wizard-form-textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.08);
    background: var(--bg-card, #1a1f2e);
    color: var(--text-primary, #f1f5f9);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.wizard-form-input:focus,
.wizard-form-textarea:focus {
    border-color: var(--primary, #60a5fa);
}

.wizard-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.wizard-form-input.error {
    border-color: #ef4444;
}

.wizard-form-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

/* --- Multi-select chips (Step 4) --- */
.wizard-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wizard-chip {
    padding: 10px 18px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: var(--bg-card, #1a1f2e);
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-chip:hover {
    border-color: rgba(96, 165, 250, 0.3);
}

.wizard-chip.selected {
    border-color: var(--primary, #60a5fa);
    background: rgba(96, 165, 250, 0.1);
    color: var(--primary, #60a5fa);
    font-weight: 600;
}

/* --- Payment Cards (Step 7) --- */
.wizard-payment-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wizard-payment-card {
    position: relative;
    padding: 28px 24px;
    border-radius: 16px;
    border: 2px solid rgba(255,255,255,0.08);
    background: var(--bg-card, #1a1f2e);
    cursor: pointer;
    transition: all 0.25s ease;
}

.wizard-payment-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-2px);
}

.wizard-payment-card.selected {
    border-color: var(--primary, #60a5fa);
    background: rgba(96, 165, 250, 0.06);
    box-shadow: 0 0 0 1px var(--primary, #60a5fa);
}

.wizard-payment-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wizard-payment-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(167,139,250,0.15));
}

.wizard-payment-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
}

.wizard-payment-card-subtitle {
    font-size: 13px;
    color: var(--text-secondary, #94a3b8);
}

.wizard-payment-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wizard-payment-details li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
}

.wizard-payment-details li::before {
    content: '\2022';
    color: var(--primary, #60a5fa);
    font-weight: 700;
}

.wizard-payment-card .check-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
    transition: all 0.2s ease;
}

.wizard-payment-card.selected .check-indicator {
    border-color: var(--primary, #60a5fa);
    background: var(--primary, #60a5fa);
    color: #fff;
}

/* --- Confirmation Step (Step 8) --- */
.wizard-summary {
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.15);
    background: var(--bg-card, #1a1f2e);
    overflow: hidden;
}

.wizard-summary-section {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wizard-summary-section:last-child {
    border-bottom: none;
}

.wizard-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.wizard-summary-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #f1f5f9);
}

/* Terms Checkbox */
.wizard-terms {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0;
    cursor: pointer;
}

.wizard-terms input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary, #60a5fa);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.wizard-terms-text {
    font-size: 14px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
}

.wizard-terms-text a {
    color: var(--primary, #60a5fa);
    text-decoration: underline;
}

/* --- Navigation Buttons --- */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    gap: 16px;
}

.wizard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.wizard-btn-back {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.12);
    color: var(--text-secondary, #94a3b8);
}

.wizard-btn-back:hover {
    border-color: rgba(255,255,255,0.25);
    color: var(--text-primary, #f1f5f9);
}

.wizard-btn-next {
    background: linear-gradient(135deg, var(--primary, #60a5fa), var(--secondary, #a78bfa));
    color: #fff;
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.3);
}

.wizard-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(96, 165, 250, 0.4);
}

.wizard-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wizard-btn-next svg,
.wizard-btn-back svg {
    width: 18px;
    height: 18px;
}

.wizard-btn-pay {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 16px;
    padding: 16px 36px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    width: 100%;
    justify-content: center;
}

.wizard-btn-pay:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.wizard-btn-pay:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Mobile Bottom Bar --- */
.wizard-mobile-bar {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .wizard-body {
        flex-direction: column;
        padding: 20px 16px;
        gap: 0;
    }

    .wizard-sidebar {
        display: none;
        width: 100%;
        position: static;
        max-height: none;
    }

    .wizard-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 101;
        background: var(--bg-card, #1a1f2e);
        border-top: 1px solid rgba(96, 165, 250, 0.15);
        padding: 14px 20px;
        align-items: center;
        justify-content: space-between;
    }

    .wizard-mobile-total {
        font-size: 13px;
        color: var(--text-secondary, #94a3b8);
    }

    .wizard-mobile-total .amount {
        display: block;
        font-size: 20px;
        font-weight: 700;
        background: linear-gradient(135deg, #60a5fa, #a78bfa);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .wizard-mobile-details-btn {
        padding: 10px 18px;
        border-radius: 10px;
        border: 1px solid rgba(96, 165, 250, 0.3);
        background: transparent;
        color: var(--primary, #60a5fa);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
    }

    /* Show sidebar as modal when details toggled */
    .wizard-sidebar.mobile-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 200;
        background: var(--bg-dark, #0f1419);
        padding: 24px;
        overflow-y: auto;
        animation: wizardSlideUp 0.3s ease-out;
    }

    @keyframes wizardSlideUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    .wizard-sidebar.mobile-open .wizard-mobile-close {
        display: flex;
    }

    .wizard-mobile-close {
        display: none;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.15);
        background: transparent;
        color: var(--text-secondary, #94a3b8);
        cursor: pointer;
        margin-bottom: 16px;
        margin-left: auto;
    }

    .wizard-mobile-close svg {
        width: 18px;
        height: 18px;
    }

    .wizard-step-title {
        font-size: 22px;
    }

    .wizard-cards {
        grid-template-columns: 1fr;
    }

    .wizard-extras-grid {
        grid-template-columns: 1fr;
    }

    .wizard-payment-cards {
        grid-template-columns: 1fr;
    }

    .wizard-nav {
        margin-bottom: 80px;
    }

    .wizard-progress {
        gap: 0;
    }

    .wizard-step-line {
        width: 12px;
    }

    .wizard-step-dot {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .wizard-header {
        padding: 12px 16px;
    }

    .wizard-step-dot {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .wizard-step-line {
        width: 8px;
    }

    .wizard-body {
        padding: 16px 12px;
    }
}

/* --- Color chips for design preferences --- */
.wizard-color-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wizard-color-chip {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-color-chip:hover {
    transform: scale(1.1);
}

.wizard-color-chip.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary, #60a5fa);
}

/* --- Loading spinner for pay button --- */
.wizard-btn-pay.loading {
    pointer-events: none;
    position: relative;
}

.wizard-btn-pay.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wizardSpin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes wizardSpin {
    to { transform: rotate(360deg); }
}
