@keyframes mvl-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

body.modal-open {
    overflow: hidden;
}

body.modal-open::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--motors-contrast-text-alpha-color);
    z-index: 999;
    opacity: 0.5;
    pointer-events: none;
    transition: 0.3s;
}

button.disabled {
    pointer-events: none;
    opacity: 0.5;
}

#add-car-autocomplete-btn {
    padding: 15px;
}

#add-car-autocomplete-btn.mvl-button-loading {
    pointer-events: none;
}

#add-car-autocomplete-btn.mvl-button-loading .add-car-autocomplete-button-text {
    opacity: 0;
}

#add-car-autocomplete-btn.mvl-button-loading i {
    opacity: 0;
}

#add-car-autocomplete-btn.mvl-button-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--motors-contrast-text-color);
    border-top: 2px solid var(--motors-accent-color);
    border-radius: 50%;
    animation: mvl-spin 1s linear infinite;
    z-index: 11;
}

.mvl-modal-car-autocomplete-popup {
    display: none;
}

.mvl-modal-car-autocomplete-popup.active {
    position: fixed;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.mvl-modal-car-autocomplete-popup .modal-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mvl-modal-car-autocomplete-popup .modal-header-inner i {
    top: 25px;
}

.mvl-modal-car-autocomplete-popup .modal-header-inner i.car-autocomplete-close-modal {
    top: 15px;
    right: 15px;
    left: unset;
    color: var(--motors-contrast-text-color);
    font-size: 16px;
    cursor: pointer;
}

.mvl-modal-car-autocomplete-popup .modal-content {
    width: 657px;
    background-color: var(--motors-bg-color);
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-wrapper {
    display: flex;
    padding: 2px;
    background-color: var(--motors-filter-inputs-color);
    border-radius: 4px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-wrapper .modal-body-inner-tab-wrapper-tab {
    width: 100%;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    border-radius: 4px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-wrapper .modal-body-inner-tab-wrapper-tab.active {
    background-color: var(--motors-bg-color);
    border: 1px solid var(--motors-border-color);
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-select-field .select2.select2-container .select2-selection {
    border-radius: 4px;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-select-field.disabled .select2.select2-container .select2-selection {
    border: 1px dashed var(--motors-border-color);
    background-color: transparent;
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-vin-data-list .mvl-vin-data-item:nth-child(odd) {
    background-color: var(--motors-filter-inputs-color);
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field-input-vin_search_auto_complete_vin {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field-input-vin_search_auto_complete_vin .mvl-listing-manager-field-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field-input-vin_search_auto_complete_vin .mvl-listing-manager-field-info-icon i {
    font-size: 16px;
    display: flex;
    color: var(--motors-text-lowalpha-color);
    cursor: pointer;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field-input-vin_search_auto_complete_vin .mvl-listing-manager-field-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field-input-vin_search_auto_complete_vin .mvl-listing-manager-field-input-wrapper input {
    border-radius: 4px;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field-input-vin_search_auto_complete_vin #vin_search_auto_complete_vin_search_btn {
    max-height: 40px;
    padding: 12px 25px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item {
    display: none;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item.active {
    display: block;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-field-group-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info {
    max-height: 300px;
    overflow-y: auto;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.empty-info .modal-body-inner-tab-content-item-info-empty-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.empty-info .modal-body-inner-tab-content-item-info-empty-info .modal-body-inner-tab-content-item-info-empty-info-text {
    max-width: 254px;
    text-align: center;
    font-size: 14px;
    line-height: 20px;
    opacity: 0.3;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.empty-info .modal-body-inner-tab-content-item-info-empty-info .modal-body-inner-tab-content-item-info-empty-info-icon i {
    font-size: 85px;
    opacity: 0.2;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.empty-info .modal-body-inner-tab-content-item-info-inner {
    display: none;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.loading {
    position: relative;
    pointer-events: none;
    height: 100%;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--motors-bg-color);
    z-index: 10;
    border-radius: 4px;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid var(--motors-border-color);
    border-top: 3px solid var(--motors-accent-color);
    border-radius: 50%;
    animation: mvl-spin 1s linear infinite;
    z-index: 11;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info .modal-body-inner-tab-content-item-info-empty-info {
    display: none;
}

.mvl-modal-car-autocomplete-popup .modal-body .modal-body-inner-tab-content-item-info .modal-body-inner-tab-content-item-info-inner {
    display: block;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-fields-group-three-columns {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-fields-group-three-columns .mvl-listing-manager-field {
    width: 100%;
}

.mvl-modal-car-autocomplete-popup .modal-body .mvl-listing-manager-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mvl-modal-car-autocomplete-popup .modal-footer {
    display: flex;
    justify-content: end;
}

.mvl-modal-car-autocomplete-popup .modal-footer button:not(:last-child) {
    margin-right: 0.25rem;
}

.mvl-modal-car-autocomplete-popup .modal-footer button:not(:first-child) {
    margin-left: 0.25rem;
}

.mvl-modal-car-autocomplete-popup .modal-footer-btn-cancel {
    background-color: var(--motors-bg-shade);
    color: var(--motors-text-color);
    border: 1px solid var(--motors-border-color);
}

.mvl-modal-car-autocomplete-popup .modal-footer-btn-cancel:hover {
    color: var(--motors-text-color);
}

.mvl-modal-car-autocomplete-popup .mvl-trim-list .mvl-trim-item {
    color: var(--motors-text-color);
}

.mvl-modal-car-autocomplete-popup .mvl-trim-list .mvl-trim-item:hover {
    background-color: var(--motors-filter-inputs-color);
}

.mvl-modal-car-autocomplete-popup .mvl-trim-list .mvl-trim-item.selected {
    background-color: var(--motors-filter-inputs-color);
}

.mvl-modal-car-autocomplete-popup .mvl-trim-list .mvl-trim-item:after {
    color: var(--motors-accent-color);
}

.mvl-color-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--motors-border-color);
}

.mvl-color-selection-header a.mvl-back-to-trims {
    color: var(--motors-accent-color);
}

.mvl-color-selection-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--motors-text-color);
}

.mvl-color-section {
    margin-bottom: 25px;
}

.mvl-color-section h5 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--motors-text-color);
}

.mvl-color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.mvl-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border: 2px solid var(--motors-border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--motors-bg-color);
}

.mvl-color-option:hover {
    border-color: var(--motors-accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mvl-color-option.selected {
    border-color: var(--motors-accent-color);
    background: var(--motors-filter-inputs-color);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.mvl-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--motors-bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.mvl-color-name {
    font-size: 12px;
    text-align: center;
    color: var(--motors-text-color);
    line-height: 1.3;
    max-width: 100px;
    word-wrap: break-word;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mvl-color-options {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .mvl-color-option {
        padding: 8px 6px;
    }

    .mvl-color-swatch {
        width: 35px;
        height: 35px;
    }

    .mvl-color-name {
        font-size: 11px;
    }
}