/*
 * Heidenheim.info – Suchergebnisse 0.1.213
 * Piktogramm-Filter am Hero, Treffer zuerst, Karte konsequent unten.
 */
:root{
  --hi213-axis:1320px;
  --hi213-filter-axis:1120px;
  --hi213-line:#d8e3e6;
  --hi213-navy:#123148;
  --hi213-petrol:#0b7a75;
  --hi213-green:#18823a;
}

/* Hero bleibt breit; darunter liegt die Filterleiste halb auf dem Bildrand. */
body.search main.hi-search-shell>.hi-search-hero{
  margin-bottom:34px!important;
}
body.search .hi-search-filter-dock{
  position:relative!important;
  z-index:8!important;
  width:min(var(--hi213-filter-axis),calc(100vw - 64px))!important;
  max-width:var(--hi213-filter-axis)!important;
  margin:-76px auto 24px!important;
  padding:0!important;
  box-sizing:border-box!important;
}
body.search .hi-search-filter-dock>.wp-block-shortcode{
  width:100%!important;
  margin:0!important;
}
body.search .hi-search-filter-dock:not(:has(.hi-search-filters)):not(:has(.hi-search-trade-picker)){
  display:none!important;
}

/* Die generischen Suchkategorien funktionieren wie die Piktogramme der Startseite. */
body.search .hi-search-filters--pictograms{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.search .hi-search-filters--pictograms .hi-search-filter{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  min-width:0!important;
  min-height:78px!important;
  padding:9px 8px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(255,255,255,.78)!important;
  border-radius:15px!important;
  background:rgba(255,255,255,.95)!important;
  box-shadow:0 9px 25px rgba(8,27,42,.18)!important;
  backdrop-filter:blur(10px)!important;
  color:var(--hi213-navy)!important;
  text-align:center!important;
  text-decoration:none!important;
  font-size:.74rem!important;
  font-weight:800!important;
  line-height:1.12!important;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease!important;
}
body.search .hi-search-filters--pictograms .hi-search-filter:hover,
body.search .hi-search-filters--pictograms .hi-search-filter:focus-visible{
  transform:translateY(-3px)!important;
  background:#fff!important;
  box-shadow:0 13px 30px rgba(8,27,42,.24)!important;
}
body.search .hi-search-filters--pictograms .hi-search-filter.is-active{
  border-color:#72b7ad!important;
  background:#eff9f7!important;
  box-shadow:0 10px 28px rgba(11,122,117,.20)!important;
}
body.search .hi-search-filter__icon{
  display:grid!important;
  width:26px!important;
  height:26px!important;
  place-items:center!important;
  color:var(--hi213-petrol)!important;
}
body.search .hi-search-filter__icon svg{width:25px!important;height:25px!important}
body.search .hi-search-filter--food .hi-search-filter__icon{color:#c96825!important}
body.search .hi-search-filter--events .hi-search-filter__icon{color:#7652b6!important}
body.search .hi-search-filter--outdoor .hi-search-filter__icon{color:#2c8742!important}
body.search .hi-search-filter--stays .hi-search-filter__icon{color:#4c6fa8!important}
body.search .hi-search-filter--service .hi-search-filter__icon{color:#0b7a75!important}
body.search .hi-search-filter--pages .hi-search-filter__icon{color:#5d6f78!important}
body.search .hi-search-filter__label{
  display:block!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
}
body.search .hi-search-filter--events .hi-search-filter__label{
  white-space:nowrap!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

/* Inhalt explizit in der gewünschten Reihenfolge halten. */
body.search .hi-search-content{
  display:flex!important;
  flex-direction:column!important;
  width:min(var(--hi213-axis),calc(100vw - 64px))!important;
}
body.search .hi-search-content>.wp-block-search{order:10!important;margin:0 0 10px!important}
body.search .hi-search-content>.wp-block-shortcode:has(.hi-search-result-count){order:20!important}
body.search .hi-search-results-zone{order:30!important;width:100%!important;margin:0!important;padding:0!important}
body.search .hi-search-map-zone{order:40!important;width:100%!important;margin:0!important;padding:0!important}
body.search .hi-search-map-zone>.wp-block-shortcode{margin:0!important}
body.search .hi-search-map-zone:not(:has(.hi-search-map)){display:none!important}
body.search .hi-search-content>.wp-block-shortcode:not(:has(.hi-search-result-count)):not(:has(.hi-search-map)){order:50!important}

/* Trefferkarten stehen unmittelbar vor der Karte. */
body.search .hi-search-results-zone .hi-search-query{width:100%!important;margin:0!important}
body.search .hi-search-map{margin:24px 0 8px!important}

/* Handwerks-Gewerke bleiben als eigener Filtertyp kompakt und liegen nicht als 20+ Piktogramme im Hero. */
body.search .hi-search-filter-dock:has(.hi-search-filters--handwerk){
  width:min(980px,calc(100vw - 64px))!important;
  margin-top:-54px!important;
}
body.search .hi-search-filters--handwerk{
  max-height:150px!important;
  overflow:auto!important;
  padding:10px!important;
  border:1px solid rgba(255,255,255,.78)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 9px 25px rgba(8,27,42,.18)!important;
  backdrop-filter:blur(10px)!important;
}

@media(max-width:1100px){
  body.search .hi-search-filters--pictograms{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  body.search .hi-search-filter-dock{margin-top:-66px!important}
}
@media(max-width:700px){
  body.search main.hi-search-shell>.hi-search-hero{margin-bottom:26px!important}
  body.search .hi-search-filter-dock{
    width:calc(100vw - 20px)!important;
    margin:-52px auto 18px!important;
  }
  body.search .hi-search-filters--pictograms{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.search .hi-search-filters--pictograms .hi-search-filter{
    min-height:68px!important;
    padding:7px 4px!important;
    border-radius:13px!important;
    font-size:.65rem!important;
  }
  body.search .hi-search-filter--events .hi-search-filter__label{font-size:.61rem!important}
  body.search .hi-search-filter__icon{width:22px!important;height:22px!important}
  body.search .hi-search-filter__icon svg{width:21px!important;height:21px!important}
  body.search .hi-search-content{width:calc(100vw - 28px)!important}
  body.search .hi-search-filter-dock:has(.hi-search-filters--handwerk){width:calc(100vw - 20px)!important;margin-top:-38px!important}
}
