/* Website-Suche (06.11.2026, modernes Design). Gehört zu /static/js/suche.js. Farben: Navy #002649, Magenta #f90bf9. */
.ate-suche {
  --s-navy: #002649;
  --s-magenta: var(--firstColor, #f90bf9);
  --s-magenta-dunkel: color-mix(in srgb, var(--s-magenta) 72%, #000);
  --s-text: #1d2b3a;
  --s-grau: #6b7a8b;
  --s-linie: #e6eaf0;
  --s-flaeche: #f4f6fa;
  --s-radius: 18px;
}

/* Lupe im Header */
html .m-header .ate-suche-knopf {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #002649;
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  transition: background-color .15s ease, color .15s ease;
}
html .m-header .ate-suche-knopf:hover, html .m-header .ate-suche-knopf:focus-visible { background: #f2f4f8; color: var(--firstColor, #f90bf9); outline: none; }
html.ate-suche-offen { overflow: hidden; }

/* Overlay */
.ate-suche[hidden] { display: none !important; }
.ate-suche { position: fixed; inset: 0; z-index: 10000; font-family: Roboto, Arial, sans-serif; color: var(--s-text); }
.ate-suche__hintergrund {
  position: absolute; inset: 0;
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--s-magenta) 18%, transparent), transparent 60%), rgba(0, 24, 48, .58);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  opacity: 0; transition: opacity .2s ease;
}
.ate-suche__fenster {
  position: relative;
  margin: 8vh auto 0;
  width: min(820px, calc(100% - 32px));
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--s-radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 20, 45, .55), 0 0 0 1px rgba(0, 38, 73, .06);
  opacity: 0; transform: translateY(-14px) scale(.985);
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}
.ate-suche__fenster::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--s-navy), var(--s-magenta));
}
.ate-suche.is-offen .ate-suche__hintergrund { opacity: 1; }
.ate-suche.is-offen .ate-suche__fenster { opacity: 1; transform: none; }

/* Eingabefeld */
.ate-suche__feld { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px 22px; }
.ate-suche__lupe { width: 24px; height: 24px; flex: none; color: var(--s-magenta); }
.ate-suche__eingabe {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: 400 22px/1.3 Roboto, Arial, sans-serif; color: var(--s-navy); padding: 4px 0; letter-spacing: .1px;
}
.ate-suche__eingabe::placeholder { color: #9aa6b4; }
.ate-suche__eingabe::-webkit-search-cancel-button { -webkit-appearance: none; }
.ate-suche kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  font: 500 11px/1 Roboto, Arial, sans-serif; color: var(--s-grau); background: #fff;
  border: 1px solid var(--s-linie); border-bottom-width: 2px; border-radius: 6px;
}
.ate-suche__esc { flex: none; }
.ate-suche__zu {
  flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--s-flaeche); color: var(--s-navy);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.ate-suche__zu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ate-suche__zu:hover, .ate-suche__zu:focus-visible { background: var(--s-navy); color: #fff; outline: none; }

/* Status und Filter */
.ate-suche__kopf { padding: 0 22px 4px; font-size: 13px; color: var(--s-grau); }
.ate-suche__kopf:empty { display: none; }
.ate-suche__meinten {
  border: 0; background: color-mix(in srgb, var(--s-magenta) 10%, transparent); color: var(--s-magenta-dunkel); padding: 2px 8px; border-radius: 999px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.ate-suche__meinten:hover { background: color-mix(in srgb, var(--s-magenta) 18%, transparent); }

.ate-suche__filter {
  display: flex; gap: 8px; padding: 10px 22px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--s-linie);
}
.ate-suche__filter::-webkit-scrollbar { display: none; }
.ate-suche__filter:empty { display: none; }
.ate-suche__filter-knopf {
  flex: none; border: 1px solid var(--s-linie); background: #fff; color: var(--s-navy); padding: 6px 13px; border-radius: 999px; cursor: pointer;
  font: 500 13px/18px Roboto, Arial, sans-serif; transition: all .15s ease; white-space: nowrap;
}
.ate-suche__filter-knopf span {
  display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--s-flaeche);
  font-size: 11px; line-height: 18px; color: var(--s-grau); text-align: center;
}
.ate-suche__filter-knopf:hover { border-color: #c5cfdb; background: var(--s-flaeche); }
.ate-suche__filter-knopf.is-aktiv { background: var(--s-navy); border-color: var(--s-navy); color: #fff; }
.ate-suche__filter-knopf.is-aktiv span { background: rgba(255, 255, 255, .16); color: #fff; }

/* Trefferliste */
.ate-suche__liste { list-style: none; margin: 0; padding: 8px 10px 10px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.ate-suche__liste > li { margin: 0; padding: 0; }
.ate-suche__treffer {
  display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; border-radius: 12px;
  text-decoration: none; color: var(--s-text); transition: background-color .12s ease;
}
.ate-suche__treffer:hover, .ate-suche__treffer.is-aktiv { background: var(--s-flaeche); text-decoration: none; color: var(--s-text); }
.ate-suche__badge {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef1f7, #e3e8f1); color: var(--s-navy); transition: all .15s ease;
}
.ate-suche__treffer.is-aktiv .ate-suche__badge, .ate-suche__treffer:hover .ate-suche__badge {
  background: linear-gradient(135deg, var(--s-navy), #1b4a7a); color: #fff;
}
.ate-suche__ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ate-suche__inhalt { flex: 1; min-width: 0; }
.ate-suche__meta { display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
.ate-suche__kat { font: 600 11px/16px Roboto, Arial, sans-serif; text-transform: uppercase; letter-spacing: .8px; color: var(--s-magenta-dunkel); }
.ate-suche__datum { font-size: 12px; color: var(--s-grau); }
.ate-suche__datum::before { content: "·"; margin-right: 8px; color: #c0c8d2; }
.ate-suche__titel { display: block; font: italic 700 16px/1.3 Rubik, Arial, sans-serif; color: var(--s-navy); }
.ate-suche__auszug {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 4px; font-size: 14px; line-height: 1.5; color: #4a5868;
}
.ate-suche mark { background: linear-gradient(transparent 55%, color-mix(in srgb, var(--s-magenta) 28%, transparent) 55%); color: inherit; padding: 0 1px; }
.ate-suche__pfeil {
  flex: none; align-self: center; width: 18px; height: 18px; fill: none; stroke: var(--s-magenta); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transform: translateX(-6px); transition: all .15s ease;
}
.ate-suche__treffer.is-aktiv .ate-suche__pfeil, .ate-suche__treffer:hover .ate-suche__pfeil { opacity: 1; transform: none; }

/* Startansicht */
.ate-suche__block { padding: 10px 12px 8px; }
.ate-suche__block-titel { font: 600 11px/1.4 Roboto, Arial, sans-serif; text-transform: uppercase; letter-spacing: 1.2px; color: var(--s-grau); margin: 0 0 10px; }
.ate-suche__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ate-suche__chip {
  border: 1px solid var(--s-linie); background: #fff; color: var(--s-navy); padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: 500 14px/1.2 Roboto, Arial, sans-serif; transition: all .15s ease;
}
.ate-suche__chip::before { content: "↗"; margin-right: 6px; color: var(--s-magenta); font-weight: 700; }
.ate-suche__chip:hover, .ate-suche__chip:focus-visible { border-color: var(--s-magenta); background: color-mix(in srgb, var(--s-magenta) 6%, transparent); outline: none; }
.ate-suche__schnell { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ate-suche__schnell a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--s-flaeche);
  font: italic 700 14px/1.2 Rubik, Arial, sans-serif; text-transform: uppercase; letter-spacing: .3px; color: var(--s-navy); text-decoration: none;
  transition: all .15s ease;
}
.ate-suche__schnell a .ate-suche__ico { color: var(--s-magenta); }
.ate-suche__schnell a:hover, .ate-suche__schnell a:focus-visible { background: var(--s-navy); color: #fff; outline: none; }

/* Fuß */
.ate-suche__fuss { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--s-linie); background: #fafbfd; }
.ate-suche__fuss:empty { display: none; }
.ate-suche__fuss a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px;
  color: var(--s-navy); text-decoration: none; border: 1px solid var(--s-linie); background: #fff; transition: all .15s ease;
}
.ate-suche__fuss a strong { font-weight: 600; }
.ate-suche__fuss a .ate-suche__ico { width: 18px; height: 18px; color: var(--s-magenta); }
.ate-suche__fuss a:hover, .ate-suche__fuss a:focus-visible { border-color: var(--s-navy); background: var(--s-navy); color: #fff; outline: none; }
.ate-suche__fuss a:hover .ate-suche__ico { color: #fff; }
.ate-suche__tasten { display: flex; gap: 18px; justify-content: flex-end; padding: 8px 20px 10px; font-size: 12px; color: var(--s-grau); background: #fafbfd; }
.ate-suche__tasten span { display: inline-flex; align-items: center; gap: 4px; }

/* Handy: Vollbild */
@media (max-width: 767.98px) {
  .ate-suche__fenster { margin: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .ate-suche__feld { padding: 14px 14px 12px 16px; }
  .ate-suche__eingabe { font-size: 18px; }
  .ate-suche .ate-suche__esc, .ate-suche__tasten { display: none; }
  .ate-suche__filter { padding: 8px 16px 10px; }
  .ate-suche__kopf { padding: 0 16px 4px; }
  .ate-suche__liste { padding: 6px 6px 10px; }
  .ate-suche__treffer { padding: 12px 10px; gap: 12px; }
  .ate-suche__badge { width: 36px; height: 36px; border-radius: 10px; }
  .ate-suche__pfeil { display: none; }
}
@media (hover: none) { .ate-suche .ate-suche__esc, .ate-suche__tasten { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ate-suche *, .ate-suche__fenster, .ate-suche__hintergrund { transition: none !important; }
}

/* Kopf-, Filter- und Fußbereich nicht stauchen (nur die Liste scrollt) */
.ate-suche__feld, .ate-suche__kopf, .ate-suche__filter, .ate-suche__fuss, .ate-suche__tasten { flex: none; }

/* Shop-Knopf neben der Lupe (z. B. „ATE-Store“) */
html .m-header .ate-shop-knopf {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 0 6px; padding: 5px 12px 5px 10px;
  border-radius: 999px; background: var(--secondColor, #002649); color: #fff !important; text-decoration: none;
  font: italic 700 12px/16px Rubik, Arial, sans-serif; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
  transition: background-color .15s ease;
  vertical-align: middle;
}
html .m-header .ate-shop-knopf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html .m-header .ate-shop-knopf:hover, html .m-header .ate-shop-knopf:focus-visible { background: var(--firstColor, #f90bf9); color: #fff !important; outline: none; text-decoration: none; }
/* Auf dem Handy gibt es den schwebenden Warenkorb-Knopf am rechten Rand – dort kein zusätzlicher Knopf im Header */
html .m-header .ate-shop-knopf--mobil { display: none !important; }
