/* =========================================================================
   cookie.css  --  Cookie-Hinweis im Agentur-Standard, dieselbe Datei auf jeder
   Site (Vorlage starter/public/css/cookie.css, Regeln handbuch/RECHT.md 3a).
   Aussehen nach dem Bild des Users vom 2026-10-24 («dass die Cookies genauso
   aussehen wie auf dem Bild», Order 2026-10-24_intern_cookie-hinweis-wie-bild-
   und-credit-auf-allen-sites, assets/referenz-cookie-hinweis.jpg). Gemessen am
   Bild (Handy, Faktor 3): Karte #111111, Radius 18 px, 16 px zum Rand, Text
   weiss 16/23 mittig, darunter zwei Pillen, «Ablehnen» hellgrau mit Rand,
   «Akzeptieren» gold, Knopftext fett und fast schwarz, 12 px Abstand.
   Best Practice dazu: beide Knoepfe gleich breit und 44 px hoch (Annehmen und
   Ablehnen gleichwertig, Tap-Ziel), sichtbarer Fokus, kein Overlay.
   Farben fest wie im Bild, auf jeder Site gleich; die Schrift erbt die Site.
   Abgeschirmt gegen das CSS der Site: jedes Element setzt mit all: unset alles
   zurueck, die Selektoren tragen [data-cookie] fuer Gewicht, Masse in px
   (manche Sites setzen html auf 62.5 %).
   public/js/cookie.js setzt .is-visible, html.hat-cookie und --cookie-h
   (Hoehe plus Abstand zum Rand); Fuss und schwebende Knoepfe weichen im CSS
   der Site damit aus (CREDIT.md 3.5).
   ========================================================================= */
.cookie-panel[data-cookie],
.cookie-panel[data-cookie] * {
  all: unset;
  box-sizing: border-box;
}
.cookie-panel[data-cookie] {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  display: block;
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 16px clamp(16px, 5vw, 24px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: #111111;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  word-spacing: normal;
  text-align: center;
  text-transform: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
/* visibility beim Oeffnen sofort, sonst nimmt «Ablehnen» den Fokus nicht an */
.cookie-panel[data-cookie].is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity .22s ease, transform .22s ease, visibility 0s;
}
.cookie-panel[data-cookie] .cookie-desc {
  display: block;
  margin: 0;
  overflow-wrap: break-word;
}
.cookie-panel[data-cookie] .cookie-desc a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  cursor: pointer;
}
.cookie-panel[data-cookie] .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
/* min-width 8.6em = 137.6 px, die Breite von «Akzeptieren» im Bild: beide Pillen gleich breit */
.cookie-panel[data-cookie] .cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.6em;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #c3bebc;
  border-radius: 999px;
  background: #e3e1e2;
  color: #1c1410;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.cookie-panel[data-cookie] .cookie-btn--all {
  border-color: #d49d39;
  background: #d49d39;
}
.cookie-panel[data-cookie] .cookie-btn:active { transform: translateY(1px); }
.cookie-panel[data-cookie] :focus-visible {
  outline: 2px solid #d49d39;
  outline-offset: 3px;
}
@media (hover: hover) {
  .cookie-panel[data-cookie] .cookie-btn:hover { background: #d3d0d1; }
  .cookie-panel[data-cookie] .cookie-btn--all:hover { border-color: #c48c2a; background: #c48c2a; }
  .cookie-panel[data-cookie] .cookie-desc a:hover { text-decoration-thickness: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-panel[data-cookie],
  .cookie-panel[data-cookie].is-visible,
  .cookie-panel[data-cookie] .cookie-btn { transition: none; }
  .cookie-panel[data-cookie] .cookie-btn:active { transform: none; }
}
@media print {
  .cookie-panel[data-cookie] { display: none; }
}
/* Optionale Inhalte (Karten, Videos): bis zur Zustimmung nur der Platzhalter der
   Site, danach nur der Inhalt. Aussehen des Platzhalters macht die Site. */
[data-cookie-box]:not(.is-geladen) [data-cookie-optional] { display: none; }
[data-cookie-box].is-geladen [data-cookie-platzhalter] { display: none; }
/* Fokus scrollt nicht unter die Karte (WCAG 2.4.11) */
.hat-cookie { scroll-padding-bottom: calc(var(--cookie-h, 0px) + 16px); }
