.wizard {
    position: relative;
}

.wizard__viewport {
    overflow: hidden;
    position: relative;
}

.wizard__track {
    position: relative;
}

.wizard__step {
    outline: none;
}

.wizard__step--slide-in-right {
    animation: wizard-slide-in-right 250ms ease-out forwards;
}

.wizard__step--slide-in-left {
    animation: wizard-slide-in-left 250ms ease-out forwards;
}

@keyframes wizard-slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes wizard-slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wizard__step--slide-in-right,
    .wizard__step--slide-in-left {
        animation: none;
    }
}

.wizard__nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.wizard__decision-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wizard__decision {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    text-decoration: underline;
}

.wizard__decision:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Dropdown layout: a <select> of options plus a submit button. */
.wizard__decision-dropdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.wizard__decision-submit {
    cursor: pointer;
    font: inherit;
}

.wizard__decision-submit:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Editor-only "show all steps" toggle (rendered only in CMS edit mode). */
.wizard__edit-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: #fff;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.wizard:hover .wizard__edit-toggle,
.wizard__edit-toggle:focus-visible {
    opacity: 1;
}

.wizard__edit-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.wizard__edit-toggle-icon {
    display: block;
}

/* Expanded (editor) view: reveal every step stacked vertically. */
.wizard--expanded .wizard__viewport {
    overflow: visible;
}

.wizard--expanded .wizard__track {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* !important is required to override the framework reset
   `[hidden] { display: none !important; }` shipped by Bootstrap and the CMS
   edit-mode debug stylesheet — without it the hidden steps stay collapsed. */
.wizard--expanded .wizard__step[hidden] {
    display: block !important;
}

.wizard--expanded .wizard__step {
    animation: none;
    opacity: 1;
}

.wizard--expanded .wizard__nav {
    display: none;
}

.wizard__sr-announcer {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
