/**
 * WK Mobile Header Styles
 *
 * Mobile-only header with category buttons, icon bar, and search field.
 * Light theme with UIkit integration.
 *
 * @package WK_YOOtheme_Child
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

.wk-mh-extension {
    /* Core colors */
    --wk-mh-bg: #f6f8fa;
    --wk-mh-text: #333333;
    --wk-mh-text-muted: #666666;
    --wk-mh-border: rgba(0, 0, 0, 0.1);

    /* Interactive states */
    --wk-mh-hover-bg: rgba(0, 0, 0, 0.05);
    --wk-mh-active-bg: rgba(0, 0, 0, 0.08);
    --wk-mh-focus-ring: var(--uk-global-primary-background, #E5762A);

    /* Spacing scale */
    --wk-mh-spacing-xs: 4px;
    --wk-mh-spacing-sm: 8px;
    --wk-mh-spacing-md: 12px;
    --wk-mh-spacing: 10px;

    /* Border radius */
    --wk-mh-radius-sm: 4px;
    --wk-mh-radius: 6px;
    --wk-mh-radius-lg: 16px;

    /* Shadows */
    --wk-mh-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --wk-mh-shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
    --wk-mh-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --wk-mh-transition-fast: 0.15s ease;
    --wk-mh-transition: 0.2s ease;
    --wk-mh-transition-slow: 0.3s ease;

    /* Touch target */
    --wk-mh-touch-target: 44px;
}

/* ==========================================================================
   Sticky Wrapper
   ========================================================================== */

.wk-mh-sticky-wrapper {
    z-index: 1000;
}

/* Lower header z-index when modal/overlay is open */
body.uk-modal-page .wk-mh-sticky-wrapper,
body:has(.uk-modal.uk-open) .wk-mh-sticky-wrapper,
body:has(.uk-offcanvas.uk-open) .wk-mh-sticky-wrapper {
    z-index: 990 !important;
}

/* When Moto-Finder is open, dim the search field */
.wk-vehicle-badge.is-open ~ .wk-mh-search,
.wk-mh-icons:has(.wk-vehicle-badge.is-open) ~ .wk-mh-search {
    position: relative;
    z-index: -1;
}

/* Alternative: make search semi-transparent when moto-finder open */
.wk-mh-extension:has(.wk-vehicle-badge.is-open) .wk-mh-search {
    opacity: 0.3;
    pointer-events: none;
}

/* When stuck, add shadow */
.wk-mh-sticky-wrapper.uk-sticky-fixed .wk-mh-extension {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Container
   ========================================================================== */

.wk-mh-extension {
    background-color: var(--wk-mh-bg);
    color: var(--wk-mh-text);
    padding: var(--wk-mh-spacing);
}

/* ==========================================================================
   Category Buttons (UIkit Primary)
   ========================================================================== */

.wk-mh-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: var(--wk-mh-spacing);
    overflow: visible;
    /* GPU-accelerated animation - use max-height instead of height */
    opacity: 1;
    max-height: 200px; /* Large enough for content */
    transform: translateY(0);
    will-change: transform, opacity, max-height;
    transition:
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide categories on scroll down */
.wk-mh-scrolled-down .wk-mh-categories {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    transform: translateY(-10px);
    overflow: hidden;
    pointer-events: none;
}

/* Make extension the positioning context for dropdowns */
.wk-mh-extension {
    position: relative;
}

/* Categories container - static by default for dropdown positioning relative to extension */
.wk-mh-categories {
    position: static;
}

/* When dropdown is open, categories get high z-index */
.wk-mh-categories:has(.uk-open) {
    position: relative;
    z-index: 1000;
}

.wk-mh-cat-dropdown {
    position: relative;
}

/* When dropdown is open, raise z-index above icon bar and search */
.wk-mh-cat-dropdown.wk-dropdown-open {
    z-index: 1000;
}

/* UIkit button adjustments for mobile header */
.wk-mh-categories .uk-button-primary,
.wk-mh-cat-dropdown .uk-button-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 44px;
    padding: 12px 16px;
}

.wk-mh-categories .uk-button-primary:focus-visible,
.wk-mh-cat-dropdown .uk-button-primary:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Rotate chevron when dropdown is open */
.wk-mh-cat-dropdown .uk-button-primary [uk-icon*="chevron-down"] {
    transition: transform 0.2s ease;
}

.wk-mh-cat-dropdown.wk-dropdown-open .uk-button-primary [uk-icon*="chevron-down"] {
    transform: rotate(180deg);
}

/* Fullwidth Dropdown - positioned relative to .wk-mh-extension */
.wk-mh-cat-dropdown .uk-dropdown {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    margin: 0 !important;
    background: #fff;
    z-index: 9999;
}

/* Ensure icon bar and search stay below category dropdown */
.wk-mh-icon-bar {
    position: relative;
    z-index: 5;
}

.wk-mh-search {
    position: relative;
    z-index: 5;
}

/* When moto-finder modal/overlay is open, search should be behind it */
body.wk-moto-finder-open .wk-mh-search,
body:has(.wk-moto-finder-modal.uk-open) .wk-mh-search,
body:has(.wk-vehicle-modal.uk-open) .wk-mh-search {
    z-index: 1 !important;
}


.wk-mh-cat-dropdown .uk-dropdown-nav {
    padding: 0 15px;
}

.wk-mh-cat-dropdown .uk-dropdown-nav > li > a {
    display: block;
    min-height: 44px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wk-mh-cat-dropdown .uk-dropdown-nav > li > a:focus-visible {
    outline: 2px solid var(--uk-global-primary-background, #E5762A);
    outline-offset: -2px;
}

.wk-mh-cat-dropdown .uk-dropdown-nav > li:last-child > a {
    border-bottom: none;
}

/* Category hierarchy styling */
.wk-mh-cat-parent > a {
    font-weight: 600;
    font-size: 15px;
}

.wk-mh-cat-sub > a {
    font-weight: 400;
    font-size: 14px;
    color: #666;
    padding-left: 30px !important;
}

.wk-mh-cat-sub > a:hover {
    color: var(--uk-global-primary-background, #E5762A);
}

/* ==========================================================================
   Icon Bar
   ========================================================================== */

.wk-mh-icon-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    margin-bottom: var(--wk-mh-spacing);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Logo */
.wk-mh-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.wk-mh-logo .uk-logo {
    display: flex;
    align-items: center;
}

.wk-mh-logo .uk-logo img {
    max-height: 32px;
    width: auto;
}

.wk-mh-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--wk-mh-text);
    text-decoration: none;
}

.wk-mh-logo:hover {
    text-decoration: none;
}

/* ==========================================================================
   Language Selector (GTranslate Dropdown)
   ========================================================================== */

.wk-mh-lang {
    display: flex;
    align-items: center;
}

.wk-mh-lang-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.wk-mh-lang-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.wk-mh-lang-trigger:focus-visible {
    outline: 2px solid var(--uk-global-primary-background, #E5762A);
    outline-offset: 2px;
}

.wk-mh-lang-trigger img {
    width: 24px;
    height: auto;
    border-radius: 2px;
    display: block;
}

/* Kompakte Dropdown-Styles */
.wk-mh-lang-dropdown,
.wk-mh-lang-dropdown.uk-dropdown {
    padding: 5px 0;
    min-width: 120px;
    max-width: 180px;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wk-mh-lang-dropdown .uk-nav > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
}

.wk-mh-lang-dropdown .uk-nav > li > a:focus-visible {
    outline: 2px solid var(--uk-global-primary-background, #E5762A);
    outline-offset: -2px;
}

.wk-mh-lang-dropdown .uk-nav > li > a img {
    flex-shrink: 0;
}

.wk-mh-lang-dropdown .uk-nav > li.uk-active > a {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
}

/* Icons container - reduced gap for larger touch targets */
.wk-mh-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Individual icons - WCAG 2.1 AA Touch Target (min 44px) */
.wk-mh-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--wk-mh-text);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.wk-mh-icon:hover,
.wk-mh-icon:focus {
    opacity: 1;
    color: var(--wk-mh-text);
    text-decoration: none;
    outline-offset: 2px;
}

.wk-mh-icon:focus-visible {
    outline: 2px solid var(--uk-global-primary-background, #E5762A);
    outline-offset: 2px;
}

.wk-mh-icon svg {
    width: 24px;
    height: 24px;
}

/* Custom cart icon */
.wk-mh-cart-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* Cart with count badge */
.wk-mh-cart {
    position: relative;
}

.wk-mh-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background-color: var(--uk-global-primary-background, #E5762A);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}

/* ==========================================================================
   Bike Picker Integration
   ========================================================================== */

.wk-mh-bikepicker {
    display: flex;
    align-items: center;
}

/* Override wk-moto-finder badge styles for light background */
.wk-mh-bikepicker .wk-vehicle-badge {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--wk-mh-text);
}

.wk-mh-bikepicker .wk-vehicle-badge-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--wk-mh-text);
}

.wk-mh-bikepicker .wk-vehicle-badge-text {
    display: none; /* Hide text on mobile, show only icon */
}

.wk-mh-bikepicker .wk-vehicle-badge:hover {
    background: transparent;
}

/* Dropdown styling */
.wk-mh-bikepicker .wk-vehicle-dropdown {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--wk-mh-text);
}

.wk-mh-bikepicker .wk-vehicle-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Search Field (UIkit Search Component)
   ========================================================================== */

.wk-mh-search {
    margin-top: 4px;
}

.wk-mh-search form {
    margin: 0;
}

/* UIkit search styling for mobile header */
.wk-mh-search .uk-search-default {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    overflow: hidden;
}

.wk-mh-search .uk-search-input {
    background: transparent;
    color: var(--wk-mh-text);
    padding-left: 40px;
    height: 44px;
}

.wk-mh-search .uk-search-input:focus-visible {
    outline: 2px solid var(--uk-global-primary-background, #E5762A);
    outline-offset: 2px;
}

.wk-mh-search .uk-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.wk-mh-search .uk-search-icon {
    color: var(--wk-mh-text);
    opacity: 0.7;
}

/* Live Search Results Dropdown */
.wk-mh-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: var(--wk-mh-radius);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1010;
    padding: 10px 15px;
    margin-top: 4px;
    display: none;
}

.wk-mh-search-results.wk-mh-search-open {
    display: block;
}

.wk-mh-search-results:empty {
    display: none !important;
}

/* Search result items styling */
.wk-mh-search-results .uk-nav > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 0;
    color: var(--wk-mh-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.wk-mh-search-results .uk-nav > li:last-child > a {
    border-bottom: none;
}

.wk-mh-search-results .uk-nav > li > a:focus-visible {
    outline: 2px solid var(--uk-global-primary-background, #E5762A);
    outline-offset: 2px;
}

/* Highlighted search result (keyboard navigation) */
.wk-mh-search-results .uk-nav > li[aria-selected="true"] > a {
    background-color: var(--wk-mh-hover-bg);
}

/* ==========================================================================
   Search States (Loading, Empty, Error)
   ========================================================================== */

.wk-search-loading,
.wk-search-empty,
.wk-search-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wk-mh-spacing-sm);
    padding: var(--wk-mh-spacing-md);
    text-align: center;
    color: var(--wk-mh-text-muted);
}

.wk-search-loading p,
.wk-search-empty p,
.wk-search-error p {
    margin: 0;
    font-size: 14px;
}

.wk-search-error {
    color: #d32f2f;
}

/* Visually hidden but accessible to screen readers */
.wk-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wk-mh-search-results .uk-nav > li > a img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 9px;
    flex-shrink: 0;
    background: #f1f4f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Bild-Platzhalter, falls kein Produktbild */
.wk-mh-sr-ph {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 9px;
    background: #f1f4f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8D8E8F;
}

/* Info-Spalte: Name + Preis */
.wk-mh-sr-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.wk-mh-sr-name {
    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--wk-mh-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wk-mh-sr-price {
    font-size: 13.5px;
    font-weight: 700;
    color: #D0661F;
}

.wk-mh-search-results .uk-nav > li > a:hover .wk-mh-sr-name,
.wk-mh-search-results .uk-nav > li[aria-selected="true"] > a .wk-mh-sr-name {
    color: #B45A1C;
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .wk-mh-categories,
    .wk-mh-scrolled-down .wk-mh-categories,
    .wk-mh-cat-dropdown .uk-button-primary [uk-icon*="chevron-down"],
    .wk-mh-icon,
    .wk-mh-lang-trigger {
        transition: none !important;
        transform: none !important;
        will-change: auto !important;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Slightly smaller on very small screens */
@media (max-width: 374px) {
    .wk-mh-categories .uk-button-primary {
        padding: 10px 12px;
        font-size: 12px;
    }

    .wk-mh-icons {
        gap: 16px;
    }

    .wk-mh-icon svg {
        width: 22px;
        height: 22px;
    }
}

/* ==========================================================================
   YOOtheme Builder Preview Styles
   ========================================================================== */

/* Ensure visibility in builder preview even on desktop */
.tm-builder-mode .wk-mh-extension {
    display: block !important;
    max-width: 400px;
    margin: 0 auto;
    border: 2px dashed rgba(255, 102, 0, 0.3);
}

.tm-builder-mode .wk-mh-extension::before {
    content: 'Mobile Header (nur auf Mobilger\00e4ten sichtbar)';
    display: block;
    background: rgba(255, 102, 0, 0.1);
    color: var(--uk-global-primary-background, #E5762A);
    padding: 8px;
    text-align: center;
    font-size: 11px;
    margin-bottom: 10px;
    border-radius: var(--wk-mh-radius);
}

/* ==========================================================================
   Google Translate - Hide Default UI
   ========================================================================== */

/* Hide Google Translate banner, toolbar, and popups */
.goog-te-banner-frame,
.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.goog-te-spinner-pos,
div.skiptranslate,
iframe.skiptranslate,
#google_translate_element,
#google_translate_element2,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
}

/* Prevent body shift from Google Translate */
body {
    top: 0 !important;
    position: static !important;
}

/* Hide translation tooltips on hover */
.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Theme Consistency
   ========================================================================== */

/* Keep light background regardless of section */
.uk-section-default .wk-mh-extension,
.uk-section-muted .wk-mh-extension,
.uk-section-primary .wk-mh-extension,
.uk-section-secondary .wk-mh-extension {
    background-color: var(--wk-mh-bg);
    color: var(--wk-mh-text);
}

/* ==========================================================================
   Mobile Suche – „Alle Ergebnisse anzeigen"-Fuß (wie Desktop)
   ========================================================================== */
.wk-mh-sr-all {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    margin: 6px 0 0; padding: 13px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 14px; font-weight: 700; color: #D0661F; text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.wk-mh-sr-all:hover { background: #FCEFE4; color: #B45A1C; }

/* ==========================================================================
   Kategorien-Trigger (≡) – ersetzt die alten Pills
   ========================================================================== */
.wk-mh-catbar { margin-bottom: var(--wk-mh-spacing); }
.wk-mh-menu-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: #E5762A; color: #fff; border: 0; cursor: pointer;
    padding: 13px 16px; border-radius: 11px;
    font-size: 14px; font-weight: 700; letter-spacing: .3px;
    box-shadow: 0 8px 18px -10px rgba(229,118,42,.7); transition: background .15s, transform .12s;
}
.wk-mh-menu-toggle:active { transform: scale(.99); }
.wk-mh-menu-toggle:hover { background: #2980b9; }
.wk-mh-menu-toggle .wk-mh-burger { display: inline-flex; }
.wk-mh-catbar-label { flex: 1; text-align: left; text-transform: uppercase; }
.wk-mh-catbar-chev { opacity: .85; }

/* ==========================================================================
   Off-Canvas Kategorie-Drawer
   ========================================================================== */
.wk-drawer-oc .uk-offcanvas-bar {
    width: 88vw; max-width: 360px; left: 0; padding: 0;
    background: #fff; color: #2F2C2A;
    display: flex; flex-direction: column; overflow: hidden;
    font-family: "Barlow", -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wk-drawer-bar { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.wk-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid #F2F3F3; flex: 0 0 auto;
}
.wk-drawer-head-title { font-family: "Barlow Condensed", "Barlow", sans-serif; font-weight: 800; font-size: 20px; color: #1A1A1A; }
.wk-drawer-x {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e6eaee;
    background: #fff; color: #2F2C2A; display: flex; align-items: center; justify-content: center;
}
.wk-drawer-x:hover { background: #F2F3F3; color: #2F2C2A; }

/* Panel-Track: Root + Drill-Down-Panels übereinander, eines aktiv */
.wk-drawer { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.wk-drawer-panel {
    position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 16px 16px 24px;
    transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    background: #fff;
}
.wk-drawer-panel.is-active { transform: translateX(0); }

/* Suche im Drawer – full-width mit Rahmen wie die Bike-Pille */
.wk-drawer-search { display: block; width: 100%; margin-bottom: 12px; }
.wk-drawer-search .uk-search-input {
    width: 100%; box-sizing: border-box; height: 46px; border-radius: 12px;
    background: #fff; border: 1px solid #E0E5EA;
    padding-left: 42px; font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.wk-drawer-search .uk-search-input:focus {
    background: #fff; border-color: #E5762A;
    box-shadow: 0 0 0 3px rgba(229,118,42,.14);
}

/* Bike-Karte – weiße Pille wie Desktop (MEIN BIKE + voller Name) */
.wk-drawer-veh {
    display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
    padding: 10px 13px; margin-bottom: 12px; cursor: pointer;
    border: 1px solid #E0E5EA; border-radius: 13px; background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.wk-drawer-veh:hover { border-color: #E5762A; box-shadow: 0 6px 16px -10px rgba(229,118,42,.6); }
.wk-drawer-veh-ic { flex: 0 0 auto; color: #2F2C2A; display: flex; align-items: center; }
.wk-drawer-veh-ic svg { width: 26px; height: 26px; }
.wk-drawer-veh-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wk-drawer-veh-kicker {
    font-family: "IBM Plex Mono", monospace; font-size: 8.5px; letter-spacing: .18em;
    text-transform: uppercase; color: #8D8E8F; font-weight: 600; line-height: 1.4;
}
.wk-drawer-veh-name { font-weight: 700; font-size: 13.5px; color: #2F2C2A; line-height: 1.15; }
.wk-drawer-veh .wk-drawer-chev { color: #8D8E8F; }

/* Sektions-Label */
.wk-drawer-sec-label {
    font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .18em;
    text-transform: uppercase; color: #8D8E8F; font-weight: 600;
    padding: 14px 4px 6px;
}

/* Gruppen-/Sub-Zeilen */
.wk-drawer-list { list-style: none; margin: 0; padding: 0; }
.wk-drawer-row {
    display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
    background: transparent; border: 0; cursor: pointer; text-decoration: none;
    padding: 12px 6px; color: #2F2C2A; border-bottom: 1px solid #f0f2f5;
    font-size: 15px; font-weight: 600;
}
.wk-drawer-list > li:last-child > .wk-drawer-row { border-bottom: 0; }
.wk-drawer-row:active { background: #F2F3F3; }
.wk-drawer-ic {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
    background: #F2F3F3; border: 1px solid #e9edf1;
    display: flex; align-items: center; justify-content: center;
}
.wk-drawer-ic svg { width: 19px; height: 19px; stroke: #2F2C2A; fill: none; }
.wk-drawer-row-name { flex: 1; min-width: 0; }
.wk-drawer-count {
    font-size: 13px; font-weight: 700; color: #8D8E8F;
    min-width: 20px; text-align: right;
}
.wk-drawer-chev { color: #c2ccd4; display: inline-flex; flex: 0 0 auto; }

/* Sub-Panel: Zurück + Kopf */
.wk-drawer-back {
    display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0;
    cursor: pointer; color: #D0661F; font-weight: 700; font-size: 13.5px;
    padding: 4px 4px 10px; margin-bottom: 4px;
}
.wk-drawer-sub-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; border-bottom: 1px solid #F2F3F3; margin-bottom: 6px; }
.wk-drawer-sub-title { font-family: "Barlow Condensed", "Barlow", sans-serif; font-weight: 800; font-size: 17px; color: #1A1A1A; }
.wk-drawer-row-all { color: #D0661F; }
.wk-drawer-row-all .wk-drawer-row-name strong { font-weight: 800; }

/* Suchergebnisse IM Drawer: inline im Panel-Fluss statt absolutem Overlay */
#wk-drawer-search-results { position: static !important; max-height: none !important; box-shadow: none !important; z-index: auto !important; left: auto; right: auto; top: auto; }
#wk-drawer-search-results.wk-mh-search-open { margin: 6px 0 14px; border: 1px solid #F2F3F3; border-radius: 12px; padding: 4px 10px; }

/* ==========================================================================
   Burger links neben Logo + Offcanvas-Text/Link/Input-Farben (Drawer ist weiß)
   ========================================================================== */
.wk-mh-bar-left { display: flex; align-items: center; gap: 8px; }
.wk-mh-burger-btn {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid #e6eaee; background: #fff; color: #2F2C2A;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.wk-mh-burger-btn:hover { background: #F2F3F3; border-color: #E5762A; color: #D0661F; }

/* UIkit-Offcanvas ist dunkel -> Links/Inputs im weißen Drawer dunkel erzwingen (höhere Spezifität) */
.wk-drawer-oc .uk-offcanvas-bar { color: #2F2C2A; }
.wk-drawer-oc .uk-offcanvas-bar a { color: #2F2C2A; }
.wk-drawer-oc .uk-offcanvas-bar a:hover { color: #B45A1C; }
.wk-drawer-oc .uk-offcanvas-bar a.wk-drawer-row-all,
.wk-drawer-oc .uk-offcanvas-bar a.wk-mh-sr-all { color: #D0661F; }
.wk-drawer-oc .uk-offcanvas-bar .uk-search-input { color: #2F2C2A; }
.wk-drawer-oc .uk-offcanvas-bar .uk-search-input::placeholder { color: #8a97a3; opacity: 1; }
.wk-drawer-oc .uk-offcanvas-bar .uk-search-icon,
.wk-drawer-oc .uk-offcanvas-bar .uk-search .uk-search-icon { color: #8D8E8F; }

/* ==========================================================================
   Drawer v2: Akkordeon-Tops, Bike-Leiste, Service, Suchnamen
   ========================================================================== */
.wk-drawer-acc { list-style: none; margin: 6px 0 0; padding: 0; }
.wk-drawer-acc > li { border-top: 1px solid #F2F3F3; margin: 0; }
.wk-drawer-acc > li:first-child { border-top: 0; }
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-acc-title {
    display: flex; align-items: center; gap: 8px;
    font-family: "Barlow Condensed", "Barlow", sans-serif; font-weight: 800; font-size: 16px;
    color: #1A1A1A; text-transform: none; padding: 15px 4px; text-decoration: none;
}
.wk-drawer-acc-title::before { content: none !important; }
.wk-drawer-acc-chev { margin-left: auto; color: #8D8E8F; transition: transform .2s ease; }
.wk-drawer-acc > li.uk-open .wk-drawer-acc-chev { transform: rotate(180deg); }
.wk-drawer-acc-content { margin: 0 !important; padding: 0 0 10px; }

.wk-drawer-top-all { border-bottom: 1px solid #f0f2f5; }
.wk-drawer-oc .uk-offcanvas-bar a.wk-drawer-top-all { color: #D0661F; }

/* Service-Sektion */
.wk-drawer-service .wk-drawer-ic svg { stroke: #2F2C2A; }

/* Suchergebnis-Namen im Drawer sichtbar machen (Offcanvas überschreibt CSS-Var) */
.wk-drawer-oc .uk-offcanvas-bar .wk-mh-sr-name { color: #2F2C2A; }

/* ==========================================================================
   Bike-Badge im Drawer – exakt wie Desktop-Pille (weiß, „Mein Bike", voller Name)
   ========================================================================== */
.wk-drawer-bike { margin: 0 0 14px; }
.wk-drawer-bike .wk-vehicle-badge { display: block; width: 100%; margin: 0; }
.wk-drawer-bike .wk-vehicle-badge-inner,
.wk-drawer-bike .wk-vehicle-badge-toggle,
.wk-drawer-bike .wk-vehicle-badge > a {
    display: flex !important; align-items: center; gap: 11px; width: 100%;
    border: 1px solid #E0E5EA; border-radius: 13px; background: #fff;
    padding: 10px 13px; cursor: pointer; line-height: 1.05;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.wk-drawer-bike .wk-vehicle-badge-inner:hover,
.wk-drawer-bike .wk-vehicle-badge-toggle:hover,
.wk-drawer-bike .wk-vehicle-badge > a:hover { border-color: #E5762A; box-shadow: 0 6px 16px -10px rgba(229,118,42,.6); }
.wk-drawer-bike .wk-vehicle-badge-icon { flex: 0 0 auto; background: none; width: auto; height: auto; padding: 0; border: 0; box-shadow: none; }
.wk-drawer-bike .wk-vehicle-badge-icon svg,
.wk-drawer-bike .wk-vehicle-badge-icon img { width: 26px; height: 26px; color: #2F2C2A; stroke: #2F2C2A; }
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-bike .wk-vehicle-badge-text {
    flex: 1; min-width: 0; display: inline-block; text-align: left;
    font-weight: 700; color: #2F2C2A; font-size: 13.5px; line-height: 1.12;
    white-space: normal; overflow: visible; text-overflow: clip; max-width: none;
}
.wk-drawer-bike .wk-vehicle-badge.has-vehicle .wk-vehicle-badge-text::before {
    content: "Mein Bike"; display: block; font-family: "IBM Plex Mono", monospace;
    font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase;
    color: #8D8E8F; font-weight: 600; margin-bottom: 1px;
}
.wk-drawer-bike .wk-vehicle-badge-arrow { flex: 0 0 auto; }
.wk-drawer-bike .wk-vehicle-badge-arrow svg { color: #8D8E8F; stroke: #8D8E8F; }

/* ==========================================================================
   Sprach-Dropdown über die Suchleiste heben (wenn offen)
   ========================================================================== */
.wk-mh-icon-bar:has(.uk-open) { z-index: 1003; }
.wk-mh-lang-dropdown.uk-open { z-index: 1004 !important; }

/* ==========================================================================
   Suchleiste beim Runterscrollen ausblenden, beim Hochscrollen einblenden
   (nutzt die vorhandene .wk-mh-scrolled-down-Logik aus mobile-header.js)
   ========================================================================== */
.wk-mh-search {
    max-height: 90px;
    transition:
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wk-mh-scrolled-down .wk-mh-search {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    transform: translateY(-8px);
    overflow: hidden;
    pointer-events: none;
}

/* ==========================================================================
   Logo im Drawer-Kopf, Suche full-width robust, Clear-/Schließen-Button
   ========================================================================== */
.wk-drawer-head-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.wk-drawer-head-logo { display: inline-flex; align-items: center; }
.wk-drawer-head-logo img, .wk-drawer-head-logo svg { max-height: 26px; width: auto; display: block; }

/* UIkit-Default-Breite überschreiben -> Suche füllt wie die Pille */
.wk-drawer-search.uk-search,
.wk-drawer-search .uk-search-input { width: 100% !important; box-sizing: border-box; }

/* Clear-/Schließen-Button in beiden Live-Suchen */
.wk-mh-search .uk-search, .wk-drawer-search { position: relative; }
.wk-mh-search-clear {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 28px; height: 28px; border: 0; border-radius: 50%; background: #F2F3F3;
    color: #5b6b78; cursor: pointer; display: none; align-items: center; justify-content: center;
    font-size: 17px; line-height: 1; padding: 0; z-index: 4;
}
.wk-mh-search-clear.is-visible { display: inline-flex; }
.wk-mh-search-clear:hover { background: #e0e5ea; color: #2F2C2A; }

/* Garantierter Abstand zwischen Suche und Bike-Pille */
.wk-drawer-search { margin-bottom: 14px !important; }
#wk-drawer-search-results:empty { display: none !important; }

/* ==========================================================================
   A11y & Politur (UI-Review)
   ========================================================================== */
/* P1: Touch-Targets ≥44px */
.wk-mh-burger-btn { width: 44px; height: 44px; }
.wk-drawer-x { width: 44px; height: 44px; border-radius: 10px; }
/* P1/P2: Fokus- & Hover-States im Drawer */
.wk-drawer-row:hover { background: #F2F3F3; }
.wk-drawer-row:focus-visible,
.wk-drawer-acc-title:focus-visible { outline: 2px solid #E5762A; outline-offset: -2px; border-radius: 8px; }
.wk-drawer-veh:focus-visible,
.wk-mh-burger-btn:focus-visible,
.wk-drawer-x:focus-visible,
.wk-mh-search-clear:focus-visible { outline: 2px solid #E5762A; outline-offset: 2px; }
/* Akkordeon-Titel ist jetzt <button> -> Button-Reset */
.wk-drawer-acc-title { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; }
/* P2: Kicker etwas größer */
.wk-drawer-veh-kicker { font-size: 9.5px; letter-spacing: .14em; }
/* P2: Suchfeld-Radius an Pille angleichen (13px) */
.wk-drawer-search .uk-search-input { border-radius: 13px; }

/* ==========================================================================
   Fix: Akkordeon-Titel immer dunkel (Regression behoben) + Abstände + Angebote
   ========================================================================== */
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-acc-title,
.wk-drawer-oc .uk-offcanvas-bar .uk-open > .wk-drawer-acc-title,
.wk-drawer-oc .uk-offcanvas-bar a.wk-drawer-acc-title,
.wk-drawer-oc .uk-offcanvas-bar a.wk-drawer-acc-title:hover { color: #1A1A1A !important; text-decoration: none; }
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-acc-content .wk-drawer-row { color: #2F2C2A; }

/* Parent-Abstände kompakter */
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-acc-title { padding: 12px 4px; }
.wk-drawer-acc > li { border-top-color: #f0f2f5; }

/* Schnell-Links + Angebote orange (Eyecatcher, wie Desktop) */
.wk-drawer-quick { margin-bottom: 4px; }
.wk-drawer-oc .uk-offcanvas-bar a.wk-drawer-row-offer { color: #E8650E; font-weight: 700; }
.wk-drawer-row-offer .wk-drawer-ic { color: #E8650E; border-color: #f6d8c2; background: #fdf1e8; }
.wk-drawer-row-offer .wk-drawer-ic svg { stroke: #E8650E; }

/* ✕-Schließen-Icon im Drawer sichtbar (Offcanvas macht es sonst hell) */
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-x,
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-x svg { color: #2F2C2A !important; }
.wk-drawer-x:hover { background: #F2F3F3; }

/* Akkordeon: UIkits Standard-Margin zwischen Items entfernen (zu große Lücken) */
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-acc > li { margin-top: 0 !important; }
.wk-drawer-oc .uk-offcanvas-bar .wk-drawer-acc > li + li { border-top: 1px solid #f0f2f5; }
.wk-drawer-quick { margin: 0 0 4px; }

/* Drill-Down-Richtung: Root als Basis (slidet leicht nach links wenn tief),
   Sub-Panels kommen von rechts. (Vorher: alle von rechts -> falschrum) */
.wk-drawer-panel[data-panel="root"] { transform: translateX(0); }
.wk-drawer.is-deep .wk-drawer-panel[data-panel="root"] { transform: translateX(-22%); }
.wk-drawer-panel:not([data-panel="root"]) { transform: translateX(100%); }
.wk-drawer-panel:not([data-panel="root"]).is-active { transform: translateX(0); }

/* ==========================================================================
   Superchat-Fix (mobil) — verifiziert per Headless-Chrome gegen Live.
   URSACHE: Superchat rendert das offene Panel in ein <iframe src="about:blank">.
   Ohne eigenen Compositing-Context malt der Browser dieses iframe NICHT (leer/
   weiss; Inhalt ist zwar im DOM + klickbar). position:relative + z-index auf den
   Superchat-Root erzwingt das Compositing -> das Panel wird gemalt.
   Zusaetzlich bei offenem Chat (iframe via :has erkannt) die Header-/Menue-Ebenen
   darunter legen, damit das Panel ueber allem liegt statt hinter dem Menue. */
div[id^="superchat-widget"] {
    position: relative;
    z-index: 800;
}
body:has(iframe[title="Superchat Widget Chat Panel"]) .wk-mh-sticky-wrapper,
body:has(iframe[title="Superchat Widget Chat Panel"]) .wk-topbar,
body:has(iframe[title="Superchat Widget Chat Panel"]) .wk-mh-cat-dropdown,
body:has(iframe[title="Superchat Widget Chat Panel"]) .wk-vehicle-badge-dropdown,
body:has(iframe[title="Superchat Widget Chat Panel"]) .uk-navbar-dropdown,
body:has(iframe[title="Superchat Widget Chat Panel"]) .uk-dropbar,
body:has(iframe[title="Superchat Widget Chat Panel"]) .wk-mh-search-results,
body:has(iframe[title="Superchat Widget Chat Panel"]) #wk-mobile-drawer {
    z-index: 0 !important;
}
