/* ==========================================================================
   Wizard — guided BAC calculator
   ========================================================================== */

.wizard-section {
    padding: 5rem 0 4rem;
    background: var(--bg-secondary, #f8fafc);
    min-height: calc(100vh - 76px);
}

[data-theme="dark"] .wizard-section {
    background: var(--bg-secondary, #0f172a);
}

/* Progress bar ---------------------------------------------------------- */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.wizard-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.wizard-progress-dot.done {
    background: var(--primary, #4f46e5);
}

.wizard-progress-dot.current {
    background: var(--primary, #4f46e5);
    transform: scale(1.5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.wizard-progress-bar {
    width: 24px;
    height: 2px;
    background: #cbd5e1;
    transition: background 0.3s ease;
}

.wizard-progress-bar.done {
    background: var(--primary, #4f46e5);
}

.wizard-progress-label {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    margin-top: 0.5rem;
}

/* Step container -------------------------------------------------------- */
.wizard-step {
    display: none;
    animation: wizardFadeIn 0.35s ease;
}

.wizard-step.active {
    display: block;
}

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

.wizard-question {
    text-align: center;
    margin-bottom: 2rem;
}

.wizard-question h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text, #1e293b);
}

.wizard-question p {
    color: var(--text-muted, #64748b);
    font-size: 1rem;
    margin-bottom: 0;
}

/* Option cards ---------------------------------------------------------- */
.wizard-options {
    display: grid;
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.wizard-options.grid-2 { grid-template-columns: repeat(2, 1fr); }
.wizard-options.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
    .wizard-options.grid-2,
    .wizard-options.grid-3 { grid-template-columns: 1fr; }
}

.wizard-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.75rem 1rem;
    background: var(--card-bg, #fff);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
}

.wizard-option:hover {
    border-color: var(--primary, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.wizard-option.selected {
    border-color: var(--primary, #4f46e5);
    background: rgba(79, 70, 229, 0.06);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.wizard-option i.bi {
    font-size: 2.25rem;
    color: var(--primary, #4f46e5);
    line-height: 1;
}

.wizard-option .opt-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text, #1e293b);
}

.wizard-option .opt-hint {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

/* Multi-select option cards (step 6 — drink types) --------------------- */
/* Cards need position to anchor the checkmark badge. */
.wizard-options.multiselect .wizard-option {
    position: relative;
}

/* Checkmark badge shown only when a card is selected. */
.wizard-options.multiselect .wizard-option::after {
    content: "\F26E"; /* bi-check-circle-fill */
    font-family: "bootstrap-icons";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.1rem;
    color: var(--primary, #4f46e5);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.wizard-options.multiselect .wizard-option.selected::after {
    opacity: 1;
    transform: scale(1);
}

/* Number input step ----------------------------------------------------- */
.wizard-input-wrap {
    max-width: 360px;
    margin: 0 auto;
}

.wizard-input-wrap .input-display {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary, #4f46e5);
    margin-bottom: 1rem;
    line-height: 1;
}

.wizard-input-wrap .input-display .unit {
    font-size: 1.25rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    margin-left: 0.25rem;
}

.wizard-input-wrap input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.wizard-input-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.wizard-input-wrap input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    cursor: pointer;
    border: 3px solid #fff;
}

.wizard-unit-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.wizard-unit-toggle button {
    border: 1px solid #e2e8f0;
    background: transparent;
    padding: 0.35rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    transition: all 0.2s ease;
}

.wizard-unit-toggle button.active {
    background: var(--primary, #4f46e5);
    color: #fff;
    border-color: var(--primary, #4f46e5);
}

/* Drinks step — 5 category sliders ------------------------------------- */
.drink-sliders {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.drink-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--card-bg, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.drink-slider-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 130px;
    flex-shrink: 0;
}

.drink-slider-label i.bi {
    font-size: 1.4rem;
    color: var(--primary, #4f46e5);
    line-height: 1;
}

.drink-slider-label .name {
    font-weight: 600;
    color: var(--text, #1e293b);
    font-size: 0.98rem;
}

/* Volume + ABV line under the drink name (step 7 sliders) */
.drink-slider-label .drink-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    font-weight: 400;
    margin-top: 0.1rem;
}

.drink-slider-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.drink-slider-control input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.drink-slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.drink-slider-control input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    cursor: pointer;
    border: 3px solid #fff;
}

.drink-slider-value {
    min-width: 32px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary, #4f46e5);
    line-height: 1;
}

@media (max-width: 560px) {
    .drink-slider-row {
        flex-wrap: wrap;
    }
    .drink-slider-label {
        min-width: 100%;
    }
}

.drink-summary {
    text-align: center;
    padding: 0.85rem;
    background: rgba(79, 70, 229, 0.06);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text, #1e293b);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 640px;
    margin: 1.25rem auto 0;
}

.drink-summary.empty {
    color: var(--text-muted, #64748b);
}

.drink-summary .sum-chip {
    background: var(--primary, #4f46e5);
    color: #fff;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
/* Advanced collapsible -------------------------------------------------- */
.wizard-advanced {
    max-width: 720px;
    margin: 2rem auto 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.wizard-advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
}

.wizard-advanced-toggle:hover {
    color: var(--primary, #4f46e5);
}

.wizard-advanced-body {
    display: none;
    margin-top: 1rem;
}

.wizard-advanced-body.show {
    display: block;
}

/* Nav buttons ----------------------------------------------------------- */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 720px;
    margin: 2.5rem auto 0;
    gap: 1rem;
}

/* When only Back is visible (auto-advance steps), center it */
.wizard-nav.single {
    justify-content: center;
}

.wizard-btn {
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wizard-btn-back {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: var(--text-muted, #64748b);
}

.wizard-btn-back:hover:not(:disabled) {
    background: #e2e8f0;
    color: var(--text, #1e293b);
}

.wizard-btn-back:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wizard-btn-next {
    background: var(--primary, #4f46e5);
    color: #fff;
}

.wizard-btn-next:hover:not(:disabled) {
    background: #4338ca;
    transform: translateX(2px);
}

.wizard-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-btn-next.calculate {
    background: #10b981;
}

.wizard-btn-next.calculate:hover:not(:disabled) {
    background: #059669;
}

/* Time slider (step 7) -------------------------------------------------- */
.time-slider-container {
    max-width: 560px;
    margin: 0 auto;
}

.time-slider-wrap {
    background: var(--card-bg, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem 1.5rem 1.25rem;
}

.time-slider-display {
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.time-slider-value {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary, #4f46e5);
}

.time-slider-unit {
    font-size: 1.25rem;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    margin-left: 0.4rem;
}

.time-slider-wrap input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.time-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.time-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    cursor: pointer;
    border: 3px solid #fff;
}

.time-slider-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 0.6rem;
    color: var(--text-muted, #64748b);
    font-size: 0.8rem;
}
/* Result view ----------------------------------------------------------- */
.wizard-result {
    display: none;
    animation: wizardFadeIn 0.4s ease;
}

.wizard-result.show {
    display: block;
}

.wizard-result .result-headline {
    text-align: center;
    margin-bottom: 2rem;
}

.wizard-result .result-headline .bac-big {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary, #4f46e5);
}

.wizard-result .result-headline .legal-tag {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
}

.legal-tag.over {
    background: #fee2e2;
    color: #b91c1c;
}

.legal-tag.under {
    background: #dcfce7;
    color: #15803d;
}

[data-theme="dark"] .legal-tag.over { background: rgba(239,68,68,0.18); }
[data-theme="dark"] .legal-tag.under { background: rgba(34,197,94,0.18); }

.result-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.result-actions a,
.result-actions button {
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: transparent;
    cursor: pointer;
    color: var(--text, #1e293b);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.result-actions a:hover,
.result-actions button:hover {
    border-color: var(--primary, #4f46e5);
    color: var(--primary, #4f46e5);
}
