/**
 * Vehicle Filter Block - Frontend Styles
 * 
 * @package KFZ_Web
 * @since 3.0.0
 */

/* Base */
.kfzweb-filter-block {
    /* Fallback-Werte (== aktuelle Token-Defaults aus Design/Tokens.php), damit der
       Filter auch dann sauber aussieht, wenn ein Theme/CSS-Optimierer die globalen
       :root-Tokens nicht ausliefert. Rein additiv — gesetzte Tokens gewinnen weiter.
       WICHTIG: alle nachfolgend genutzten Tokens MIT hartem Fallback spiegeln, sonst
       kippen auf Fremd-Themes (z. B. Impreza + WP Rocket) Rahmen auf currentColor,
       Hintergründe auf transparent und Abstände auf 0 (= „grausames" Bild). */
    --kfzweb-filter-primary: var(--kfzweb-primary, #0f172a);
    --kfzweb-filter-radius: var(--kfzweb-radius, 12px);
    --kfzweb-filter-gap: var(--kfzweb-gap, 18px);
    --kfzweb-filter-surface: var(--kfzweb-surface, #ffffff);
    --kfzweb-filter-text: var(--kfzweb-text, #1f2937);
    --kfzweb-filter-border: var(--kfzweb-gray-300, #d8dde5);
    --kfzweb-filter-label: var(--kfzweb-gray-500, #64748b);
    --kfzweb-filter-muted: var(--kfzweb-gray-100, #f1f5f9);
    --kfzweb-filter-focus: color-mix(in srgb, var(--kfzweb-filter-primary) 22%, transparent);

    /* Eigene Typo-Basis: erbt die Theme-Schrift, aber mit definierter Größe/Höhe,
       damit Fremd-Themes Labels/Felder nicht winzig oder riesig rendern. */
    font-family: inherit;
}

/* Defensive: eigenes box-sizing im Filter-Scope, falls das Theme keinen globalen
   Reset liefert — verhindert, dass padding+border die Felder über ihre Grid-Zelle
   hinaus aufblähen (Überlappung). */
.kfzweb-filter-block,
.kfzweb-filter-block *,
.kfzweb-filter-block *::before,
.kfzweb-filter-block *::after {
    box-sizing: border-box !important;
}

.kfzweb-filter-shell {
    display: block;
}

.kfzweb-filter-toggle {
    display: none;
}

.kfzweb-filter-form {
    display: flex;
    flex-direction: column;
    gap: var(--kfzweb-filter-gap);
}

/* Layout: Horizontal */
/* Form becomes a row so submit button aligns inline with filter fields */
.kfzweb-filter-layout-horizontal .kfzweb-filter-form {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
}

.kfzweb-filter-layout-horizontal .kfzweb-filter-fields {
    flex: 1;
    /* Festes, gleichmäßiges 3-Spalten-Raster statt auto-fill: auf breiten
       (Full-Width-)Containern wird der Filter nicht zu 6 gequetschten Feldern,
       auf schmalen bleibt er ruhig. Vorhersagbare, gerade Reihen. */
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--kfzweb-filter-gap);
    align-items: end;
}

/* Die Volltextsuche ist die wichtigste Eingabe → über die volle Breite oben,
   die Dropdowns füllen das Raster darunter gleichmäßig (3+3 statt 6+orphan). */
.kfzweb-filter-layout-horizontal .kfzweb-field-search {
    grid-column: 1 / -1;
}

/* Suchfeld etwas prominenter als die Dropdowns (es ist die Haupt-Aktion).
   Kombi-Selektor (.block.layout) schlägt die Basis-Feldregel in der Spezifität. */
.kfzweb-filter-block.kfzweb-filter-layout-horizontal .kfzweb-field-search input[type="search"] {
    height: auto !important;
    min-height: 50px !important;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .kfzweb-filter-layout-horizontal .kfzweb-filter-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kfzweb-filter-layout-horizontal .kfzweb-filter-field {
    min-width: 0;
}

.kfzweb-filter-layout-horizontal .kfzweb-filter-submit {
    flex-shrink: 0;
    /* Aktions-Reihe (Anzeigen/Zurücksetzen) als eigener Abschnitt mit feinem
       Trenner — strukturiert die Card und gibt den Buttons Luft. */
    width: 100%;
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--kfzweb-filter-border) 60%, transparent);
}

/* Layout: Vertical */
.kfzweb-filter-layout-vertical .kfzweb-filter-fields {
    display: flex;
    flex-direction: column;
    gap: var(--kfzweb-filter-gap);
}

/* Layout: Grid */
.kfzweb-filter-layout-grid-2 .kfzweb-filter-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--kfzweb-filter-gap);
}

.kfzweb-filter-layout-grid-3 .kfzweb-filter-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--kfzweb-filter-gap);
}

/* Layout: Inline */
.kfzweb-filter-layout-inline .kfzweb-filter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
}

.kfzweb-filter-layout-inline .kfzweb-filter-fields {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--kfzweb-filter-gap) / 2);
    flex: 1;
}

.kfzweb-filter-layout-inline .kfzweb-filter-field {
    flex: 0 1 auto;
}

/* Fields */
/* Höhere Spezifität (.kfzweb-filter-block …) + harte Fallbacks, damit Fremd-Themes
   die Labels nicht winzig/farblos rendern. Mikro-Label-Optik = wirkt „designt". */
.kfzweb-filter-block .kfzweb-filter-field label {
    display: block;
    margin-bottom: 7px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--kfzweb-filter-label);
}

.kfzweb-filter-block .kfzweb-filter-field select,
.kfzweb-filter-block .kfzweb-filter-field input[type="number"],
.kfzweb-filter-block .kfzweb-filter-field input[type="text"],
.kfzweb-filter-block .kfzweb-filter-field input[type="search"] {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: var(--kfzweb-filter-text);
    background-color: var(--kfzweb-filter-surface);
    border: 1px solid var(--kfzweb-filter-border);
    border-radius: var(--kfzweb-filter-radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.kfzweb-filter-block .kfzweb-filter-field select:hover,
.kfzweb-filter-block .kfzweb-filter-field input:hover {
    border-color: color-mix(in srgb, var(--kfzweb-filter-border) 55%, #94a3b8);
}

.kfzweb-filter-block .kfzweb-filter-field select {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

/* Suchfeld: Lupe links (gleiches Icon-Muster wie der Select-Pfeil) */
.kfzweb-filter-block .kfzweb-field-search input[type="search"] {
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
}

.kfzweb-field-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.kfzweb-filter-field select:focus,
.kfzweb-filter-field input:focus {
    outline: none;
    border-color: var(--kfzweb-filter-primary);
    box-shadow: 0 0 0 3px var(--kfzweb-filter-focus);
}

/* Keyboard Focus - Enhanced visibility */
.kfzweb-filter-field select:focus-visible,
.kfzweb-filter-field input:focus-visible {
    outline: 2px solid var(--kfzweb-filter-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--kfzweb-filter-focus);
}

.kfzweb-filter-block .kfzweb-filter-field select:disabled {
    background-color: var(--kfzweb-gray-100, #f1f5f9);
    color: var(--kfzweb-gray-400, #94a3b8);
    cursor: not-allowed;
}

/* Checkbox-Feld (Junge Sterne): gleiche Höhe/Optik wie ein Select, damit es im
   Raster sauber neben den Dropdowns steht. */
.kfzweb-filter-block .kfzweb-filter-field .kfzweb-filter-microlabel {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--kfzweb-filter-label);
}

.kfzweb-filter-block .kfzweb-filter-field label.kfzweb-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    margin: 0;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--kfzweb-filter-text);
    background-color: var(--kfzweb-filter-surface);
    border: 1px solid var(--kfzweb-filter-border);
    border-radius: var(--kfzweb-filter-radius);
    box-sizing: border-box;
    cursor: pointer;
}

.kfzweb-filter-block .kfzweb-filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--kfzweb-filter-primary);
}

.kfzweb-filter-block .kfzweb-filter-checkbox .kfzweb-filter-checkbox-text {
    min-width: 0;
}

/* Trefferzahl nie abschneiden und nie in sich umbrechen. */
.kfzweb-filter-block .kfzweb-filter-checkbox .kfzweb-filter-count {
    white-space: nowrap;
    color: var(--kfzweb-filter-label);
}

/* Price/Mileage Range */
.kfzweb-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kfzweb-range-inputs input {
    flex: 1;
    text-align: center;
}

.kfzweb-range-inputs span {
    color: var(--kfzweb-gray-400, #94a3b8);
}

.kfzweb-price-fields {
    display: flex;
    gap: 8px;
}

.kfzweb-price-fields input {
    flex: 1;
}

/* Range Slider Track */
.kfzweb-range-slider {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kfzweb-range-track {
    position: relative;
    height: 6px;
    background: var(--kfzweb-gray-200, #e2e8f0);
    border-radius: 3px;
    cursor: pointer;
}

.kfzweb-range-progress {
    position: absolute;
    height: 100%;
    background: var(--kfzweb-filter-primary);
    border-radius: 3px;
    left: 0;
    width: 100%;
    transition: left 0.1s, width 0.1s;
}

/* Loading State */
.kfzweb-filter-form.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.kfzweb-filter-form.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--kfzweb-filter-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: kfzweb-spin 0.8s linear infinite;
}

@keyframes kfzweb-spin {
    to { transform: rotate(360deg); }
}

/* Disabled options */
.kfzweb-filter-field select option:disabled {
    color: var(--kfzweb-gray-400, #94a3b8);
    font-style: italic;
}

/* Submit Button */
.kfzweb-filter-submit {
    display: flex;
}

.kfzweb-filter-block .kfzweb-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 26px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background-color: var(--kfzweb-filter-primary);
    border: none;
    border-radius: var(--kfzweb-filter-radius);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18), 0 8px 18px -8px color-mix(in srgb, var(--kfzweb-filter-primary) 55%, transparent);
    transition: background-color 0.15s, transform 0.1s, box-shadow 0.15s;
    white-space: nowrap;
}

.kfzweb-filter-block .kfzweb-filter-button:hover {
    background-color: color-mix(in srgb, var(--kfzweb-filter-primary) 88%, black);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.2), 0 12px 22px -8px color-mix(in srgb, var(--kfzweb-filter-primary) 60%, transparent);
}

.kfzweb-filter-button:active {
    transform: scale(0.98);
}

.kfzweb-filter-button svg {
    flex-shrink: 0;
}

.kfzweb-filter-status {
    flex-basis: 100%;
    min-height: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

.kfzweb-filter-result-count:empty,
.kfzweb-filter-toggle-count:empty {
    display: none;
}

/* Style: Modern */
.kfzweb-filter-style-modern .kfzweb-filter-form {
    padding: 24px 26px;
    background-color: var(--kfzweb-filter-surface);
    border: 1px solid color-mix(in srgb, var(--kfzweb-filter-border) 70%, transparent);
    border-radius: calc(var(--kfzweb-filter-radius) + 4px);
    /* Zweistufiger, weicher Schatten = hochwertiger als ein harter Single-Shadow */
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 28px -14px rgba(16, 24, 40, 0.18);
}

/* Style: Minimal */
.kfzweb-filter-style-minimal .kfzweb-filter-field select,
.kfzweb-filter-style-minimal .kfzweb-filter-field input {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    padding-left: 0;
    padding-right: 0;
    background-position: right 0 center;
}

.kfzweb-filter-style-minimal .kfzweb-filter-field select:focus,
.kfzweb-filter-style-minimal .kfzweb-filter-field input:focus {
    border-bottom-color: var(--kfzweb-filter-primary);
    box-shadow: none;
}

.kfzweb-filter-style-minimal .kfzweb-filter-button {
    border-radius: 0;
}

/* Style: Boxed */
.kfzweb-filter-style-boxed .kfzweb-filter-form {
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--kfzweb-filter-radius);
}

.kfzweb-filter-style-boxed .kfzweb-filter-field {
    padding: 12px;
    background: #fff;
    border-radius: var(--kfzweb-filter-radius);
    border: 1px solid #e5e7eb;
}

.kfzweb-filter-style-boxed .kfzweb-filter-field select,
.kfzweb-filter-style-boxed .kfzweb-filter-field input {
    border: none;
    background: transparent;
    padding: 6px 0;
}

.kfzweb-filter-style-boxed .kfzweb-filter-field select:focus,
.kfzweb-filter-style-boxed .kfzweb-filter-field input:focus {
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .kfzweb-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        color: #1f2937;
        background: #fff;
        border: 1px solid #d1d5db;
        border-radius: var(--kfzweb-filter-radius);
        cursor: pointer;
        list-style: none;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }

    .kfzweb-filter-toggle::-webkit-details-marker {
        display: none;
    }

    .kfzweb-filter-toggle-label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-weight: 700;
    }

    .kfzweb-filter-toggle-label svg {
        stroke: var(--kfzweb-filter-primary);
        flex-shrink: 0;
    }

    .kfzweb-filter-toggle-count {
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        text-align: right;
    }

    .kfzweb-filter-shell[open] .kfzweb-filter-form {
        margin-top: 12px;
    }

    .kfzweb-filter-shell:not([open]) .kfzweb-filter-form {
        display: none;
    }

    /* Revert horizontal form to column on mobile */
    .kfzweb-filter-layout-horizontal .kfzweb-filter-form {
        flex-direction: column;
    }

    .kfzweb-filter-layout-horizontal .kfzweb-filter-fields,
    .kfzweb-filter-layout-grid-3 .kfzweb-filter-fields {
        grid-template-columns: 1fr 1fr;
    }

    .kfzweb-filter-layout-inline .kfzweb-filter-form {
        flex-direction: column;
    }

    .kfzweb-filter-submit {
        width: 100%;
    }

    .kfzweb-filter-button {
        width: 100%;
    }

    .kfzweb-filter-status {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .kfzweb-filter-layout-horizontal .kfzweb-filter-fields,
    .kfzweb-filter-layout-grid-2 .kfzweb-filter-fields,
    .kfzweb-filter-layout-grid-3 .kfzweb-filter-fields {
        grid-template-columns: 1fr;
    }
}

/* Placeholder in editor */
.kfzweb-filter-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    background: #f8f8f8;
    border-radius: 8px;
    color: #666;
}

.kfzweb-filter-placeholder svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================ */

/* Button focus states */
.kfzweb-filter-button:focus-visible {
    outline: 3px solid var(--kfzweb-filter-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--kfzweb-filter-focus);
}

/* Reduced Motion - Respect user preferences */
@media (prefers-reduced-motion: reduce) {
    .kfzweb-filter-field select,
    .kfzweb-filter-field input,
    .kfzweb-filter-button,
    .kfzweb-range-progress {
        transition: none !important;
    }
    
    @keyframes kfzweb-spin {
        to { transform: rotate(360deg); }
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    .kfzweb-filter-field select,
    .kfzweb-filter-field input {
        border-width: 2px;
    }
    
    .kfzweb-filter-button {
        border: 2px solid currentColor;
    }
    
    .kfzweb-filter-style-modern .kfzweb-filter-form {
        border: 2px solid currentColor;
        box-shadow: none;
    }
    
    .kfzweb-filter-field select:focus-visible,
    .kfzweb-filter-field input:focus-visible {
        outline-width: 4px;
    }
}

/* Detailsuche (advanced filters, collapsible) */
.kfzweb-filter-advanced {
    flex-basis: 100%;
    margin-top: calc(var(--kfzweb-filter-gap) / 2);
}

.kfzweb-filter-advanced-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--kfzweb-filter-primary);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.kfzweb-filter-advanced-toggle::-webkit-details-marker {
    display: none;
}

.kfzweb-filter-advanced-chevron {
    transition: transform 0.2s;
}

.kfzweb-filter-advanced[open] .kfzweb-filter-advanced-chevron {
    transform: rotate(180deg);
}

.kfzweb-filter-fields-advanced {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--kfzweb-filter-gap);
    align-items: end;
    margin-top: 14px;
}

@media (max-width: 1024px) {
    .kfzweb-filter-fields-advanced {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .kfzweb-filter-fields-advanced {
        grid-template-columns: 1fr;
    }
}

/* Submit + Reset row */
.kfzweb-filter-submit {
    display: flex;
    gap: 8px;
    align-items: center;
}

.kfzweb-filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 46px;
    padding: 11px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--kfzweb-filter-primary);
    background-color: transparent;
    border: 1px solid color-mix(in srgb, var(--kfzweb-filter-primary) 32%, transparent);
    border-radius: var(--kfzweb-filter-radius);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.kfzweb-filter-reset:hover {
    background: color-mix(in srgb, var(--kfzweb-filter-primary) 8%, transparent);
    border-color: var(--kfzweb-filter-primary);
}

.kfzweb-filter-reset svg {
    flex-shrink: 0;
}

/* Print Styles */
@media print {
    .kfzweb-filter-block {
        display: none;
    }
}

/* ============================================================================
   ROBUSTHEITS-LAYER
   Neutralisiert aggressive Fremd-Theme-/Page-Builder-Styles (Impreza, WPBakery,
   Divi, Avada, Elementor …) im Filter-Scope. Steht bewusst GANZ AM ENDE (gewinnt
   bei gleicher Spezifität über die Quell-Reihenfolge) und nutzt !important NUR für
   struktur-/typografie-neutrale Eigenschaften, die NICHT mit Marken-Customizing
   kollidieren. Farben/Akzente laufen weiter über die Tokens → kundenseitige
   Akzentfarbe wirkt unverändert.
   ============================================================================ */

.kfzweb-filter-block {
    color-scheme: light;        /* Dark-Mode-Themes sollen Felder nicht invertieren */
    text-align: left;
}

/* Form-Controls (NICHT label — dessen Uppercase-Optik ist gewollt) gegen
   Theme-Bleed absichern: Schrift, Transform, Spacing, Float, Breiten. */
.kfzweb-filter-block input,
.kfzweb-filter-block select,
.kfzweb-filter-block button,
.kfzweb-filter-block a,
.kfzweb-filter-block summary {
    font-family: inherit !important;
    text-transform: none !important;     /* Impreza macht Buttons sonst UPPERCASE */
    letter-spacing: normal !important;
    text-shadow: none !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
}

/* Felder: Höhe/Breite/Zeilenhöhe gegen Theme-Resets fixieren (height:auto +
   min-height = Theme-Zwangshöhen werden neutralisiert, Mindesthöhe bleibt). */
.kfzweb-filter-block .kfzweb-filter-field select,
.kfzweb-filter-block .kfzweb-filter-field input[type="number"],
.kfzweb-filter-block .kfzweb-filter-field input[type="text"],
.kfzweb-filter-block .kfzweb-filter-field input[type="search"] {
    width: 100% !important;
    height: auto !important;
    min-height: 46px !important;
    line-height: 1.4 !important;
    /* Feld-Optik via Token erzwingen → schlägt selbst `body input{background:#222!important}`
       (0,2,1!important > 0,0,2!important). Über die Tokens bleibt es customizebar. */
    background-color: var(--kfzweb-filter-surface) !important;
    color: var(--kfzweb-filter-text) !important;
    border: 1px solid var(--kfzweb-filter-border) !important;
}

/* Disabled-State (z. B. Modell vor Markenwahl) trotz erzwungener Feld-Optik erhalten. */
.kfzweb-filter-block .kfzweb-filter-field select:disabled {
    background-color: var(--kfzweb-gray-100, #f1f5f9) !important;
    color: var(--kfzweb-gray-400, #94a3b8) !important;
}

/* Fokus muss trotz erzwungenem Rahmen sichtbar bleiben. */
.kfzweb-filter-block .kfzweb-filter-field select:focus,
.kfzweb-filter-block .kfzweb-filter-field input:focus {
    border-color: var(--kfzweb-filter-primary) !important;
    box-shadow: 0 0 0 3px var(--kfzweb-filter-focus) !important;
}

/* Mikro-Labels: dürfen vom Theme nicht verkleinert/„entkapitälchen" werden. */
.kfzweb-filter-block .kfzweb-filter-field label {
    display: block !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    line-height: 1.3 !important;
}

/* Ausnahme: Checkbox-Feld (Junge Sterne) ist ein Eingabefeld, kein Mikro-Label —
   höhere Spezifität (0,3,1), damit die Regel oben es nicht verkleinert. */
.kfzweb-filter-block .kfzweb-filter-field label.kfzweb-filter-checkbox {
    display: flex !important;
    text-transform: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
}

/* Button bleibt sichtbar als Primärfläche, egal welches Theme button-Resets macht.
   (KEIN width-Zwang — sonst bricht die mobile Vollbreite width:100%.)
   text-transform/letter-spacing hier nochmals auf (0,2,1), um auch Theme-Regeln
   wie `.theme button{text-transform:uppercase!important}` (0,1,1) zu schlagen. */
.kfzweb-filter-block .kfzweb-filter-button {
    min-height: 46px !important;
    height: auto !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
