.wizard-search {
    margin: 2rem 0;
    --duration: 250ms;

    a {
        color: var(--theme-color-dark);
        text-decoration: none;
    }

    a:hover {
        text-decoration: none;
        color: var(--theme-color-dark);
    }
}


.wizard-search .form-control {
    box-shadow: none;
}


.wizard-list__container {
    position: relative;
    margin: .5rem 0 2.5rem;
    display: flex;
    flex-wrap: nowrap;

}

.wizard-result__container {
    display: flex;
    gap: 1rem;
    position: relative;
}

.wizard-result__controls {
    position: relative;
    top: 1rem;
    cursor: pointer;
}

.wizard-result {
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    min-height: 2rem;
}

.wizard-list {
    display: grid;
    align-content: flex-start;
    overflow-y: hidden;
    overflow-x: auto;
    transition: all calc(var(--duration) * 3) ease-out;
    height: calc(5rem * 5);
    width: 0;

    &.show {
        width: 100%;
    }

    scrollbar-color: var(--theme-color-primary) #e2e8f0; /* цвет бегунка и дорожки */
    scrollbar-width: thin;

    /* Для Webkit-браузеров */
    &::-webkit-scrollbar {
        width: 6px;
    }

    &::-webkit-scrollbar-thumb {
        background-color: var(--theme-color-primary);
        border-radius: 6px;
        border: 2px solid transparent;
        background-clip: content-box;
    }

    &::-webkit-scrollbar-track {
        background-color: #e2e8f0;
        border-radius: 6px;
    }
}

.wizard-list__brands {
    grid-template-columns: repeat(var(--cols), 20rem);
    grid-template-rows: repeat(var(--rows), 4rem);
    grid-auto-flow: column;
    transition: all var(--duration) ease;

    scroll-behavior: auto;
    cursor: grab;
    user-select: none;

    scroll-snap-type: x mandatory;

    &:active {
        cursor: grabbing;
    }

    &.dragging {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    &.selected {
        .wizard-list__brands__item {
            opacity: 0;
        }
    }
}

.wizard-list__models {
    grid-template-columns: repeat(var(--cols), 20rem);
    grid-template-rows: repeat(5, 4rem);
    grid-auto-flow: column;
    transition: opacity var(--duration) ease, width var(--duration) ease;
    user-select: none;

    > div {
        line-height: 2rem;
        position: relative;
        top: 1px;
    }

    &.visible {
        animation: var(--duration) visible-keyframes var(--duration) ease forwards;
    }

    &.selected > div {
        opacity: 0;
    }
}

.wizard-list__lineups {
    grid-template-columns: repeat(var(--cols), 15rem);
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    gap: .5rem;
    user-select: none;

    transition: opacity var(--duration) ease, width var(--duration) ease;
}

.wizard-list__brands__item,  .wizard-result__item {
    display: flex;
    align-items: center;
    transition: all var(--duration) ease;

    &.active {
        opacity: 1;
    }

    .wizard-list__brands__name {
        width: max-content;
    }
}

.wizard-result__item {
    font-weight: bold;
}

.wizard-result__head {
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    min-height: 2rem;
    position: absolute;
    font-weight: normal;
    font-size: 1.5rem;
}

.wizard-vin__head {
    margin-bottom: 1rem;
    font-weight: bold;
}

.wizard-list__brands__item:hover .wizard-list__brands__image img {
    opacity: 0.7;
}


.wizard-list__models__item {
    display: flex;
    align-items: center;
    transition: all var(--duration) ease;
    width: max-content;
    height: 2rem;

    &.active {
        opacity: 1;
    }
}

.wizard-list > div {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    cursor: pointer;
    max-width: 15em;
    font-size: .9em;
}

.wizard-list .strong {
    font-weight: bold;
}

.wizard-list__brands__image {
    width: 3rem;
    height: 2rem;
    margin-right: 10px;
    text-align: center;
}

.wizard-list__brands__image img {
    max-width: 100%;
    transition: all 150ms ease;
    height: 100%;
}

.wizard-list__line__item-text {
    line-height: 1.25em;
}

.wizard-list__line__item-image {

    display: flex;
    align-items: center;
    justify-content: start;
    margin-bottom: .25em;

    img {
        border-radius: var(--block-border-radius);
        width: 9.5rem;
    }
}

.wizard-list__line__item-body {
    font-size: .8em;
    line-height: 1.1em;
    opacity: .5;
}

.wizard-list__controls {

    font-size: 2rem;

    .wizard-list__button {
        position: absolute;
        top: 50%;
        transform: translateY(-100%);
        cursor: pointer;
        color: var(--theme-color-primary);
        transition: all 250ms ease;
    }

    .wizard-list__button:hover {
        color: var(--theme-color-dark);
    }

    .wizard-list__button_prev {
        left: 1.5rem;
    }

    .wizard-list__button_next {
        right: 1.5rem;
    }
}