/**
 * Custom CSS for iAutolizings
 */

/* Use Cyrillic-capable font for Russian locale */
html[lang="ru"] {
    --font-primary: "Fira Sans", Arial, sans-serif;
}

/* Catalog Filter Select Styling */
.catalog-filter {
    width: 100%;
    max-width: 100%;
}

/* Select options should be visible - don't hide overflow on select element */
.catalog-filter option {
    max-width: 100%;
    overflow: visible;
    white-space: normal;
    padding: 5px;
}

/* Searchable Nice-Select Dropdown Enhancements */
.nice-select.searchable .list {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nice-select .nice-select-search {
    padding: 8px;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

.nice-select .nice-select-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.nice-select .nice-select-search input:focus {
    border-color: #999;
}

.nice-select .list .option.filtered {
    display: none;
}

/* Scrollbar styling for nice-select dropdown */
.nice-select .list::-webkit-scrollbar {
    width: 6px;
}

.nice-select .list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.nice-select .list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.nice-select .list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading indicator spinner */
.loading-indicator {
    padding: 2rem 0;
}

.loading-indicator .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Application Step 2 Progress Indicator */
.application-progress {
    margin: 2rem 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.progress-step .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.progress-step.completed .step-number {
    background: #28a745;
    color: #fff;
}

.progress-step.active .step-number {
    background: #4E006E;
    color: #fff;
}

.progress-line {
    width: 100px;
    height: 2px;
    background: #ddd;
    margin: 0 1rem;
    margin-top: -21px;
}

.progress-step.completed + .progress-line {
    background: #28a745;
}

/* ------------------------------------------------------------
   Catalog detail enhancements (location, seller box, gallery)
------------------------------------------------------------ */
.car-location-highlight {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.75rem 0 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 12px;
    background: #F40D5C;
    color: #fff;
    text-shadow: none !important;
    box-shadow: none !important;
    font-size: 0.95rem;
    font-weight: 400;
    width: 100%;
    flex-wrap: wrap;
}

.car-location-highlight * {
    text-shadow: none !important;
}

.car-location-highlight .label {
    opacity: 0.9;
    font-weight: 400;
}

.car-location-highlight .value {
    font-weight: 400;
    overflow-wrap: anywhere;
}

.seller-inline {
    font-size: 0.95rem;
    color: #3e1350;
    font-weight: 600;
}

.seller-inline-label {
    opacity: 0.8;
    margin-right: 0.25rem;
}

.seller-inline-value {
    font-weight: 800;
}

.btn-phone-reveal {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.5rem 0.75rem;
}

.carbuy-btn {
    text-decoration: none !important;
    padding: 0.35rem 0.75rem;
    font-weight: 500;
}

.car-description p:last-child {
    margin-bottom: 0;
}

/* Catalog detail gallery: make portrait images same height as landscape */
.catalog-details .catalog-gallery .catalog_car_gallery .swiper-slide {
    /* Match generated detail images (800x600 => 4:3) */
    aspect-ratio: 4 / 3;
}

.catalog-details .catalog-gallery .catalog_car_gallery .swiper-slide > a {
    display: block;
    height: 100%;
}

.catalog-details .catalog-gallery .catalog_car_gallery .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Gallery modal */
.car-gallery-modal-body {
    background: #000;
}

.car-gallery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    filter: invert(1);
}

.car-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.car-gallery-prev { left: 12px; }
.car-gallery-next { right: 12px; }

.car-gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.9rem;
    z-index: 5;
}