/**
 * ═══════════════════════════════════════════════════════════════════════════
 * wezunu Header-Toolbar + Such/Filter-Drawer (Slide-in von rechts)
 * Developed by Toni Sciacca - mail@tonisciacca.com
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════ Header-Toolbar ═══════════════ */
.header-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.header-inner { position: relative; }

/* ─── Lupe + Karte: nur sichtbar wenn am Hero vorbei gescrollt ─── */
/* Hero-Page (transparent oder weder transparent noch scrolled) → Buttons aus */
.header.transparent #dbSearchOpen,
.header.transparent #desktopMapToggle,
.header:not(.scrolled) #dbSearchOpen,
.header:not(.scrolled) #desktopMapToggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, width 0.22s ease;
}
/* Discovery-Page (scrolled) → Buttons rein-faden */
.header.scrolled #dbSearchOpen,
.header.scrolled #desktopMapToggle {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    width: 42px;
    transition: opacity 0.22s ease 0.05s, transform 0.22s ease 0.05s, width 0.22s ease;
}
/* Karte-Button hat eigene Breite (rund, 42px ist ok) */

/* Legacy Hero-Composer ("Dauer | Wie | Reisen zeigen") — komplett ausblenden */
#heroComposer { display: none !important; }

/* ═══════════════ Round-Icon-Button ═══════════════ */
.hdr-icon-btn {
    position: relative;
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 50%;
    cursor: pointer;
    color: #1a1a1a;
    transition: all 0.18s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
}
.hdr-icon-btn:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}
.hdr-icon-btn i { width: 18px; height: 18px; stroke-width: 2; }
.hdr-icon-btn.is-active {
    background: #FF385C;
    color: #fff;
    border-color: #FF385C;
}

/* Filter-Counter-Badge auf der Lupe */
.hdr-icon-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FF385C;
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    border: 2px solid #fff;
}
.hdr-icon-badge[hidden] { display: none; }

/* Karte: Pink wenn aus, Schwarz wenn an */
.hdr-map-btn {
    background: #FF385C;
    border-color: #FF385C;
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 56, 92, 0.35);
}
.hdr-map-btn:hover {
    background: #E0224C;
    border-color: #E0224C;
    color: #fff;
}
.hdr-map-btn i { width: 18px; height: 18px; }
.hdr-map-btn.is-active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.hdr-map-btn.is-active:hover {
    background: #000;
    border-color: #000;
}

/* AI Planer */
.hdr-ai-btn,
.btn-ai-concierge.hdr-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px 0 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.40), inset 0 1px 0 rgba(255,255,255,0.20);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.18s ease;
}
.hdr-ai-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55), inset 0 1px 0 rgba(255,255,255,0.28);
}
.hdr-ai-btn i { width: 15px; height: 15px; }

.header-toolbar .sh-av-lg {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #e8e8e8;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-toolbar .sh-av-lg i { width: 18px; height: 18px; color: #9a9a9a; }

/* ═══════════════ SUCH/FILTER-DRAWER (Slide-in von rechts) ═══════════════ */
.hdr-search-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.42);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.hdr-search-backdrop.open { opacity: 1; pointer-events: auto; }

.hdr-search-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 460px;
    max-width: 92vw;
    background: #fff;
    box-shadow: -16px 0 48px rgba(0,0,0,0.18);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
    font-family: 'Outfit', sans-serif;
}
.hdr-search-drawer.open { transform: translateX(0); }

/* Drawer-Header */
.hdr-search-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.hdr-search-drawer-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}
.hdr-search-drawer-title i { width: 18px; height: 18px; color: #FF385C; }
.hdr-search-drawer-close {
    border: 0;
    background: rgba(0,0,0,0.06);
    width: 34px; height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.hdr-search-drawer-close:hover { background: rgba(0,0,0,0.14); }
.hdr-search-drawer-close i { width: 16px; height: 16px; color: #4a4a4a; }

/* Drawer-Body (scroll) */
.hdr-search-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px 22px;
    -webkit-overflow-scrolling: touch;
}

/* Such-Row: Input + Reset-Button */
.hdr-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hdr-search-row .hdr-search-pop-bar { flex: 1; min-width: 0; }

/* Reset-Button (rund, neben der Suche) */
.hdr-reset-btn {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.10);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4a4a4a;
    transition: all 0.18s ease;
}
.hdr-reset-btn:hover {
    background: #FF385C;
    border-color: #FF385C;
    color: #fff;
    transform: rotate(-90deg);
}
.hdr-reset-btn i { width: 16px; height: 16px; transition: transform 0.2s ease; }

/* Such-Input */
.hdr-search-pop-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f7f7f7;
    border-radius: 999px;
}
.hdr-search-pop-icon { width: 18px; height: 18px; color: #9a9a9a; flex-shrink: 0; }
.hdr-search-pop-input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: #1a1a1a;
    min-width: 0;
}
.hdr-search-pop-input::placeholder { color: #9a9a9a; }
.hdr-search-pop-clear {
    border: 0;
    background: rgba(0,0,0,0.10);
    width: 24px; height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hdr-search-pop-clear:hover { background: rgba(0,0,0,0.18); }
.hdr-search-pop-clear[hidden] { display: none; }
.hdr-search-pop-clear i { width: 12px; height: 12px; color: #4a4a4a; }

.hdr-search-pop-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 0;
    font-size: 12px;
    color: #9a9a9a;
}
.hdr-search-pop-hint i { width: 12px; height: 12px; color: #FF385C; flex-shrink: 0; }

/* Active-Filter-Chips (Pink, jeweils mit × zum Einzel-Entfernen) */
.hdr-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    animation: hdrChipsIn 0.22s ease;
}
.hdr-active-chips[hidden] { display: none; }
@keyframes hdrChipsIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hdr-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 12px;
    background: linear-gradient(180deg, #FF385C, #E0224C);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 56, 92, 0.30);
    cursor: default;
}
.hdr-active-chip .hdr-active-chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    background: rgba(255,255,255,0.30);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease;
}
.hdr-active-chip .hdr-active-chip-x:hover { background: rgba(255,255,255,0.55); }
.hdr-active-chip .hdr-active-chip-x i { width: 11px; height: 11px; }

/* Live-Ergebnisse */
.hdr-search-results { margin: 14px 0 4px; }
.hdr-search-results:empty { display: none; }

/* Filter-Divider */
.hdr-filter-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 14px;
    font-size: 11px;
    font-weight: 700;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hdr-filter-divider::before,
.hdr-filter-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,0.08);
}

/* Filter-Section */
.hdr-filter-section { margin-bottom: 18px; }
.hdr-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

/* Range-Slider */
.hdr-filter-section input[type="range"] {
    width: 100%;
    accent-color: #FF385C;
}
.hdr-filter-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 12px;
    color: #9a9a9a;
}
.hdr-filter-range-labels span:last-child { color: #FF385C; font-weight: 700; }

/* Text-Input */
.hdr-filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hdr-filter-input:focus {
    border-color: #FF385C;
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.12);
}

/* Filter-Chips */
.hdr-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hdr-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: #fff;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.15s ease;
}
.hdr-chip:hover { border-color: #FF385C; color: #FF385C; }
.hdr-chip.is-active {
    background: #FF385C;
    border-color: #FF385C;
    color: #fff;
}

/* Score-Slider Rows */
.hdr-filter-scores {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hdr-score-row {
    display: grid;
    grid-template-columns: 90px 1fr 40px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #4a4a4a;
}
.hdr-score-row span { display: inline-flex; align-items: center; gap: 6px; }
.hdr-score-row i { width: 13px; height: 13px; }
.hdr-score-row input[type="range"] { accent-color: #FF385C; }
.hdr-score-val {
    font-weight: 700;
    color: #FF385C;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Drawer-Footer */
.hdr-search-drawer-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid rgba(0,0,0,0.06);
    background: #fafafa;
    flex-shrink: 0;
}
.hdr-foot-btn {
    flex: 1;
    height: 44px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.hdr-foot-clear {
    background: #fff;
    color: #4a4a4a;
    border: 1px solid rgba(0,0,0,0.10);
    flex: 0 1 auto;
    padding: 0 18px;
}
.hdr-foot-clear:hover { background: #f0f0f0; color: #1a1a1a; }
.hdr-foot-apply {
    background: linear-gradient(180deg, #FF385C, #E0224C);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 56, 92, 0.35), inset 0 1px 0 rgba(255,255,255,0.20);
}
.hdr-foot-apply:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 56, 92, 0.48); }

/* AI-Button im Footer (Lila Pill) */
.hdr-foot-ai {
    flex: 0 1 auto;
    padding: 0 16px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.40), inset 0 1px 0 rgba(255,255,255,0.22);
}
.hdr-foot-ai:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(168, 85, 247, 0.55); }
.hdr-foot-ai i { width: 15px; height: 15px; }
.hdr-foot-count {
    background: rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.hdr-foot-count[hidden] { display: none; }

/* Mobile */
@media (max-width: 720px) {
    .hdr-ai-btn span { display: none; }
    .hdr-ai-btn { padding: 0 14px; }
    .hdr-search-drawer { width: 100vw; max-width: 100vw; }
    .header-toolbar { gap: 6px; }
}
