/* Shared vehicle search (resources/views/components/vehicle-search). Uses the design tokens from styles.css. */

.vs {
    --vs-r: 14px;
    --vs-h: 44px;
    color: var(--t);
}

.vs [hidden],
.vs-dialog [hidden] {
    display: none !important;
}

.vs-label {
    display: block;
    margin-bottom: 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--m);
}

.vs-unit {
    font-weight: 500;
}

.vs-hint {
    margin-top: 6px;
    font-size: .75rem;
    color: var(--m);
}

.vs-note {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, #f59e0b 12%, var(--s));
    color: #92400e;
    font-size: .75rem;
}

.vs-field {
    min-width: 0;
    border: 0;
    padding: 0;
    margin: 0;
}

/* a <legend> normally sits on the fieldset border; make it lay out like the other labels */
.vs legend.vs-label {
    float: left;
    width: 100%;
    padding: 0;
}

.vs legend.vs-label+* {
    clear: both;
}

.vs-field-error {
    margin-top: 6px;
    font-size: .72rem;
    font-weight: 600;
    color: #dc2626;
}

.vs-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--g);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.vs-link:hover {
    text-decoration: underline;
}

.vs-grow {
    flex: 1 1 0;
}

/* inputs */
.vs-input,
.vs-select {
    width: 100%;
    min-height: var(--vs-h);
    border: 1px solid var(--b);
    border-radius: 12px;
    background: var(--s);
    color: var(--t);
    padding: 0 12px;
    font: inherit;
    font-size: .88rem;
    font-weight: 600;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.vs-input::placeholder {
    color: var(--m);
    font-weight: 500;
}

.vs-input:focus,
.vs-select:focus-visible {
    border-color: var(--g);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 18%, transparent);
}

.vs-input[aria-invalid="true"] {
    border-color: #dc2626;
}

.vs-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: start;
    cursor: pointer;
}

.vs-select:hover:not(:disabled) {
    border-color: var(--g);
}

.vs-select:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.vs-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vs-select-icon {
    font-size: .65rem;
    opacity: .6;
}

.vs-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vs-range>.vs-input {
    flex: 1 1 0;
    min-width: 0;
}

.vs-range-sep {
    color: var(--m);
}

/* keyword with attached search button */
.vs-keyword {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1px solid var(--b);
    border-radius: 14px;
    background: var(--s);
    transition: border-color .15s, box-shadow .15s;
}

.vs-keyword:focus-within {
    border-color: var(--g);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 18%, transparent);
}

.vs-keyword-icon {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--m);
    font-size: .85rem;
    pointer-events: none;
}

.vs-keyword input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 48px;
    border: 0;
    background: transparent;
    padding-inline: 40px 10px;
    font: inherit;
    font-size: .95rem;
    font-weight: 500;
    color: var(--t);
    outline: none;
}

.vs-keyword-btn {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    margin: 4px;
    border: 0;
    border-radius: 10px;
    background: var(--g);
    color: #fff;
    font-size: .95rem;
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.vs-keyword-btn:hover {
    transform: translateX(2px);
}

[dir="rtl"] .vs-keyword-btn:hover {
    transform: translateX(-2px);
}

.vs-keyword-btn:hover {
    background: var(--gd);
}

.vs-keyword-btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--g) 40%, transparent);
    outline-offset: 2px;
}

/* chips */
.vs-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.vs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--g) 35%, var(--b));
    border-radius: 999px;
    background: color-mix(in srgb, var(--g) 8%, var(--s));
    color: var(--t);
    padding: 4px 10px;
    font-size: .74rem;
    font-weight: 600;
    cursor: pointer;
}

.vs-chip:hover {
    border-color: var(--g);
}

.vs-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vs-chip i {
    font-size: .65rem;
    opacity: .7;
}

.vs-chip--static {
    cursor: default;
    border-color: var(--b);
    background: var(--s2);
}

.vs-chips--inline {
    margin-top: 8px;
}

/* pills (advanced page multi-selects) */
.vs-filter-box {
    position: relative;
    margin-bottom: 8px;
    max-width: 320px;
}

.vs-filter-box i {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .75rem;
    color: var(--m);
}

.vs-filter-input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--b);
    border-radius: 10px;
    background: var(--s);
    padding-inline: 32px 10px;
    font: inherit;
    font-size: .82rem;
    outline: none;
}

.vs-filter-input:focus {
    border-color: var(--g);
}

.vs-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vs-pills[data-collapsed="true"] [data-extra] {
    display: none;
}

.vs-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    border: 1px solid var(--b);
    border-radius: 999px;
    background: var(--s);
    padding: 0 14px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.vs-pill:hover {
    border-color: var(--g);
}

.vs-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vs-pill:has(input:checked) {
    border-color: var(--g);
    background: color-mix(in srgb, var(--g) 12%, var(--s));
    color: var(--gd);
}

.vs-pill:has(input:checked)::before {
    content: "✓";
    font-size: .7rem;
}

.vs-pill:has(input:focus-visible) {
    outline: 3px solid color-mix(in srgb, var(--g) 40%, transparent);
    outline-offset: 2px;
}

.vs-pill.is-filtered-out {
    display: none !important;
}

.vs-more {
    margin-top: 10px;
}

.vs-swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border-radius: 999px;
    box-shadow: 0 0 0 1px var(--b), inset 0 0 0 1px rgba(127, 127, 127, .45);
}

.vs-swatch.is-unknown {
    background: repeating-linear-gradient(45deg, rgba(127, 127, 127, .35) 0 3px, transparent 3px 6px);
}

/* segmented choice + switch */
.vs-segmented {
    display: inline-flex;
    width: 100%;
    padding: 3px;
    border: 1px solid var(--b);
    border-radius: 12px;
    background: var(--s2);
}

.vs-segment {
    flex: 1 1 0;
    position: relative;
}

.vs-segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vs-segment span {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--m);
    cursor: pointer;
}

.vs-segment input:checked+span {
    background: var(--s);
    color: var(--t);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.vs-segment input:focus-visible+span {
    outline: 3px solid color-mix(in srgb, var(--g) 40%, transparent);
}

.vs-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
}

.vs-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vs-switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--b);
    transition: background .15s;
}

.vs-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    inset-inline-start: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: inset-inline-start .15s;
}

.vs-switch input:checked+.vs-switch-track {
    background: var(--g);
}

.vs-switch input:checked+.vs-switch-track::after {
    inset-inline-start: 21px;
}

.vs-switch input:focus-visible+.vs-switch-track {
    outline: 3px solid color-mix(in srgb, var(--g) 40%, transparent);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------- hero (home page) */
.vs--hero {
    max-width: 1000px;
}

.vs-hero-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .vs-hero-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vs--hero .vs-field--keyword {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .vs-hero-grid {
        grid-template-columns: 1.15fr 1fr 1.25fr;
    }
}

.vs--hero .vs-field:not(.vs-field--keyword) {
    background: color-mix(in srgb, var(--s) 65%, transparent);
    border: 1px solid color-mix(in srgb, var(--b) 70%, transparent);
    border-radius: var(--vs-r);
    padding: 8px 12px;
}

.vs--hero .vs-field:not(.vs-field--keyword):focus-within {
    border-color: var(--g);
}

.vs--hero .vs-field:not(.vs-field--keyword) .vs-label {
    margin-bottom: 2px;
    font-size: .68rem;
}

.vs--hero .vs-field:not(.vs-field--keyword) .vs-input,
.vs--hero .vs-field:not(.vs-field--keyword) .vs-select {
    min-height: 30px;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.vs--hero .vs-keyword input {
    min-height: 54px;
    font-size: 1rem;
}

.vs--hero .vs-hint {
    padding-inline: 4px;
}

.vs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.vs-advanced-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
}

@media (max-width: 639px) {
    .vs-hero-actions .vs-submit {
        width: 100%;
    }
}

/* ---------------------------------------------------------------- sidebar (marketplace) */
.listing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.listing-results {
    min-width: 0;
}

.vs--sidebar {
    min-width: 0;
}

.vs-panel {
    border: 1px solid var(--b);
    border-radius: 18px;
    background: var(--s);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.vs-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--b);
}

.vs-panel-title {
    flex: 1 1 auto;
    margin: 0;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--g);
}

.vs-panel-title i {
    margin-inline-end: 8px;
}

.vs-panel-body {
    padding: 14px 16px;
}

.vs-panel-body>.vs-chips {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--b);
}

.vs-section+.vs-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--b);
}

.vs-section-title {
    margin: 15px 0 10px;
    font-size: .78rem;
    font-weight: 800;
    color: var(--t);
}

.vs-stack {
    display: grid;
    gap: 12px;
}

.vs-all-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    min-height: 42px;
    border: 1px dashed var(--g);
    border-radius: 12px;
    color: var(--g);
    font-size: .82rem;
    font-weight: 700;
}

.vs-all-filters:hover {
    background: color-mix(in srgb, var(--g) 8%, var(--s));
}

.vs-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: .78rem;
    font-weight: 600;
}

.vs-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--b);
    border-radius: 10px;
    background: var(--s);
    color: var(--t);
    cursor: pointer;
}

.vs-icon-btn:hover {
    border-color: var(--g);
    color: var(--g);
}

.vs-mobile-bar,
.vs-panel-foot,
.vs-drawer-close,
.vs-drawer-backdrop {
    display: none;
}

.vs-understood {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
    gap: 6px;
    font-size: .78rem;
}

/* hidden when the keyword search understood nothing (display:flex above would override the hidden attribute) */
.vs-understood[hidden] {
    display: none;
}

.vs-understood-label {
    font-weight: 700;
    color: var(--m);
}

@media (min-width: 1024px) {
    .listing-layout {
        grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
        gap: 1.5rem;
    }

    @media (min-width: 1024px) {
        .listing-layout {
            grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
            gap: 1.5rem;
        }
    }

}

@media (max-width: 1023px) {
    .vs-mobile-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 4px;
    }

    .vs-keyword--bar {
        flex: 1 1 auto;
        min-width: 0;
    }

    .vs-keyword--bar input {
        padding-inline-start: 14px;
        min-height: 46px;
    }

    .vs-drawer-open {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 48px;
        flex-shrink: 0;
        border: 1px solid var(--g);
        border-radius: 14px;
        background: var(--s);
        color: var(--g);
        padding: 0 14px;
        font-size: .82rem;
        font-weight: 700;
        cursor: pointer;
    }

    .vs-count-badge {
        display: inline-grid;
        place-items: center;
        min-width: 1.25rem;
        height: 1.25rem;
        padding: 0 4px;
        border-radius: 999px;
        background: var(--g);
        color: #fff;
        font-size: .68rem;
    }

    .vs-count-badge:empty {
        display: none;
    }

    .vs--sidebar .vs-field--keyword {
        display: none;
    }

    .vs-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 109;
        display: block;
        background: rgba(0, 0, 0, .5);
    }

    .vs-drawer-close {
        display: inline-grid;
    }

    .vs--sidebar .vs-panel {
        position: fixed;
        z-index: 110;
        inset-block: 0;
        inset-inline-start: 0;
        display: flex;
        flex-direction: column;
        width: min(24rem, 92vw);
        max-height: 100dvh;
        border-radius: 0;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s;
        box-shadow: 0 0 2rem rgba(0, 0, 0, .2);
    }

    [dir="rtl"] .vs--sidebar .vs-panel {
        transform: translateX(105%);
    }

    .vs--sidebar.is-drawer-open .vs-panel {
        transform: none;
        visibility: visible;
    }

    .vs-panel-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .vs-panel-foot {
        display: flex;
        gap: 10px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--b);
        background: var(--s);
    }
}

/* ---------------------------------------------------------------- advanced search page */
/* room for the fixed action bar below the footer too */
body:has(.vs--advanced) {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

@media (max-width: 639px) {
    body:has(.vs--advanced) {
        padding-bottom: calc(124px + env(safe-area-inset-bottom));
    }
}

.vs-chips--top {
    margin-bottom: 16px;
}

.vs-groups {
    display: grid;
    gap: 16px;
}

.vs-group {
    padding: 20px;
    border-radius: 18px;
}

.vs-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 800;
}

.vs-group-title i {
    color: var(--g);
}

.vs-group>.vs-hint {
    margin: -6px 0 14px;
}

.vs-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
    .vs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vs-grid>.vs-field--wide,
    .vs-grid>.vs-field--keyword {
        grid-column: 1 / -1;
    }
}

.vs-actionbar {
    position: fixed;
    z-index: 60;
    inset-inline: 0;
    bottom: 0;
    border-top: 1px solid var(--b);
    background: color-mix(in srgb, var(--s) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .15);
}

.vs-actionbar-in {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 12px;
}

.vs-live-count {
    flex: 1 1 auto;
    min-width: 0;
    text-align: end;
    font-size: .82rem;
    font-weight: 600;
}

.vs-actionbar .vs-submit {
    min-width: 12rem;
}

@media (max-width: 639px) {
    .vs-group {
        padding: 16px;
    }

    .vs-actionbar-in {
        flex-wrap: wrap;
    }

    .vs-live-count {
        order: -1;
        flex-basis: 100%;
        text-align: center;
    }

    .vs-actionbar .btn-o {
        flex: 0 0 auto;
    }

    .vs-actionbar .vs-submit {
        flex: 1 1 auto;
        min-width: 0;
        height: 48px;
    }
}

/* ---------------------------------------------------------------- shared dialog (modal / bottom sheet) */
.vs-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(calc(100% - 2rem), 44rem);
    max-width: none;
    height: min(88vh, 42rem);
    padding: 0;
    border: 1px solid var(--b);
    border-radius: 18px;
    background: var(--s);
    color: var(--t);
    overflow: hidden;
}

.vs-dialog.is-compact {
    height: auto;
    max-height: 88vh;
    width: min(calc(100% - 2rem), 30rem);
}

.vs-dialog::backdrop {
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
}

.vs-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: vsIn .18s ease-out;
}

@keyframes vsIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.vs-dialog-shell {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
}

/* Only the body scrolls. Without this the tags bar (a scroll container, so its min-height is 0) was squashed
   to a sliver whenever the list below was long, hiding the selected brands on the brand list. */
.vs-dialog-shell> :not(.vs-dialog-body) {
    flex-shrink: 0;
}

.vs-dialog-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--b);
    background: var(--s2);
}

.vs-dialog-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .95rem;
    font-weight: 800;
}

.vs-dialog-search {
    position: relative;
    padding: 12px 16px;
    border-bottom: 1px solid var(--b);
}

.vs-dialog-search i {
    position: absolute;
    inset-inline-start: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: .8rem;
    color: var(--m);
}

.vs-dialog-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--b);
    border-radius: 12px;
    background: var(--s);
    padding-inline: 38px 12px;
    font: inherit;
    font-size: .9rem;
    outline: none;
}

.vs-dialog-search input:focus {
    border-color: var(--g);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 18%, transparent);
}

.vs-dialog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 6.5rem;
    overflow-y: auto;
    padding: 10px 16px;
    border-bottom: 1px solid var(--b);
    background: var(--s2);
}

.vs-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 16px;
}

.vs-dialog-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--b);
    background: var(--s2);
}

.vs-dialog-foot-info {
    display: flex;
    flex: 1 1 10rem;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.vs-dialog-foot-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.vs-dialog-summary {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .78rem;
    color: var(--m);
}

/* long labels ("Search all Aston Martin models") shrink with an ellipsis instead of overflowing */
.vs-dialog-foot-actions .btn {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-state {
    padding: 28px 8px;
    text-align: center;
    font-size: .85rem;
    color: var(--m);
}

.vs-state .vs-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-bottom: 8px;
    border: 3px solid var(--g);
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: vsSpin .8s linear infinite;
}

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

.vs-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vs-list--grid {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}

.vs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--b);
    border-radius: 12px;
    background: var(--s);
    padding: 8px 12px;
    text-align: start;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    color: var(--t);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.vs-row:hover,
.vs-row:focus-visible {
    border-color: var(--g);
    outline: none;
}

.vs-row:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 25%, transparent);
}

.vs-row.is-on,
.vs-row:has(input:checked) {
    border-color: var(--g);
    background: color-mix(in srgb, var(--g) 9%, var(--s));
}

.vs-row input {
    accent-color: var(--g);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.vs-row-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vs-row-meta {
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 600;
    color: var(--m);
}

.vs-row-badge {
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--g);
    color: #fff;
    padding: 2px 8px;
    font-size: .68rem;
    font-weight: 700;
}

.vs-row .fa-chevron-right {
    font-size: .65rem;
    opacity: .5;
}

[dir="rtl"] .vs-row .fa-chevron-right {
    transform: scaleX(-1);
}

.vs-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    object-fit: contain;
}

.vs-brand-item {
    position: relative;
}

.vs-brand-item:has(.vs-row-remove) .vs-row {
    padding-inline-end: 52px;
}

.vs-row-remove {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--b);
    border-radius: 9px;
    background: var(--s);
    color: var(--m);
    cursor: pointer;
}

.vs-row-remove:hover,
.vs-row-remove:focus-visible {
    border-color: #dc2626;
    color: #dc2626;
    outline: none;
}

.vs-models-hint {
    margin: 0 0 12px;
}

.vs-year-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.vs-year-col .vs-section-label {
    margin-top: 0;
}

.vs-year-list {
    display: grid;
    gap: 4px;
    max-height: min(20rem, 50dvh);
    overflow-y: auto;
    padding: 4px;
    border: 1px solid var(--b);
    border-radius: 12px;
    scrollbar-width: thin;
}

.vs-year {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    padding: 0 12px;
    font: inherit;
    font-size: .85rem;
    font-weight: 600;
    color: var(--t);
    text-align: start;
    cursor: pointer;
}

.vs-year:hover:not(:disabled),
.vs-year:focus-visible {
    background: var(--s2);
    outline: none;
}

.vs-year.is-any {
    color: var(--m);
    font-weight: 500;
}

.vs-year.is-active {
    background: color-mix(in srgb, var(--g) 14%, var(--s));
    color: var(--gd);
}

.vs-year.is-active::after {
    content: "✓";
    font-size: .75rem;
}

.vs-year:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.vs-section-label {
    margin: 14px 0 8px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--m);
}

@media (max-width: 640px) {

    .vs-dialog,
    .vs-dialog.is-compact {
        inset: auto 0 0 0;
        margin: 0;
        width: 100%;
        max-height: 92dvh;
        border-radius: 18px 18px 0 0;
    }

    .vs-dialog:not(.is-compact) {
        height: 92dvh;
    }

    .vs-list--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vs-dialog-foot-actions {
        flex: 1 1 100%;
    }

    .vs-dialog-foot-actions .btn {
        flex: 1 1 0;
    }

    .vs-dialog-foot-actions [data-vs-dialog-apply] {
        flex-grow: 2;
    }
}

body.vs-locked {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {

    .vs-dialog[open],
    .vs--sidebar .vs-panel,
    .vs-state .vs-spinner {
        animation: none !important;
        transition: none !important;
    }
}
