/**
 * Styles for Vehicle Archive Page with Filter Sidebar
 */

.vehicle-archive {
    /* max-width: 1400px; */
    /* margin: 0 auto; */
    /* padding: 20px; */
}

.vehicle-archive .page-header {
    margin-bottom: 30px;
}

.vehicle-archive .page-title {
    font-size: 2em;
    margin: 0 0 20px 0;
}

.vehicle-archive-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Filter Sidebar */
.vehicle-filter-sidebar {
    flex: 0 0 300px;
    /* background: #f5f5f5; */
    /* padding: 20px; */
    border-radius: 8px;
    position: sticky;
    top: 120px;
    padding-bottom: 68px; /* 68px := Buttons */
    max-height: calc(100vh - 170px); /* 170px := Navigation + "Fahrzeuge"-Headline */
    overflow: auto;
    scrollbar-width: thin;
    padding-right: 10px;
}

body.admin-bar .vehicle-filter-sidebar {
    top: 170px;
}

.vehicle-filter-form {
    position: relative;
}

.vehicle-filter-form h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.filter-field {
    margin-bottom: 15px;
}

.filter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.filter-field select,
.filter-field input[type="text"],
.filter-field input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.filter-field select:focus,
.filter-field input[type="text"]:focus,
.filter-field input[type="number"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.range-inputs input[type="number"],
.range-inputs select {
    flex: 1;
}

.range-separator {
    color: #666;
    font-weight: 500;
}

.range-slider {
    margin-top: 10px;
}

.range-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 1;
}

/* Dual range slider wrapper */
.dual-range-slider .slider-wrapper {
    position: relative;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
}

.dual-range-slider .slider-wrapper input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
}

.dual-range-slider .slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dual-range-slider .slider-wrapper input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    border: none;
    pointer-events: all;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dual-range-slider .slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
}

.dual-range-slider .slider-wrapper input[type="range"]::-moz-range-track {
    height: 6px;
    background: transparent;
}

/* Active range between the two handles */
.dual-range-slider .slider-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--min-percent, 0%);
    width: calc(var(--max-percent, 100%) - var(--min-percent, 0%));
    height: 6px;
    background: #0073aa;
    border-radius: 3px;
    pointer-events: none;
    z-index: 0;
}

/* Single range slider (for backward compatibility) */
.range-slider:not(.dual-range-slider) input[type="range"] {
    background: #ddd;
}

.range-slider:not(.dual-range-slider) input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
}

.range-slider:not(.dual-range-slider) input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.filter-actions {
    display: flex;
    gap: 10px;
    position: fixed;
    background: white;
    bottom: 0;
    padding: 10px 0;
    margin: 0;
    width: 292px; /* 300px (sidebar) - 8px (scrollbar) */
}

/* Vehicle List Container */
.vehicle-list-container {
    flex: 1;
    min-width: 0;
}

.vehicle-results-header {
    margin-bottom: 20px;
}

.results-count {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
}

.vehicle-pagination {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px 0;
}

.page-info {
    color: #666;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vehicle-archive-content {
        flex-direction: column;
    }
    
    .vehicle-filter-sidebar {
        flex: none;
        width: 100%;
        position: static;
        max-height: none;
    }

    .filter-actions {
        position: static;
    }
}

