/* ---------- Hinweis-Popup (Schulungen, Termine) ----------
   Natives <dialog>: Esc, Fokusfang und Backdrop kommen vom Browser.
   Geschlossen wird einmal pro Gerät gemerkt (localStorage, siehe main.js).
   Gestaltung: Aushang auf Papier — eckig, Mono-Zeilen, Messing als Akzent. */
/* Der Dialog selbst ist nur Rahmen ohne Fläche: die Karte trägt Papier und Schatten.
   So darf die Deko (hinweis.deko) über die Kartenkanten hinausragen. */
.hinweis {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(30rem, calc(100vw - 2 * var(--gutter)));
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  overflow: visible;
}
.hinweis__karte {
  position: relative;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  padding: clamp(1.75rem, 4vw, 2.4rem);
  border-top: 4px solid var(--brass);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
.hinweis::backdrop { background: rgb(11 26 19 / 0.74); }

/* Eintritt: leicht aufsteigend, damit es nicht ins Bild springt. */
.hinweis[open] { animation: hinweis-auf var(--dur-slow) var(--ease-out) both; }
.hinweis[open]::backdrop { animation: hinweis-dim var(--dur-base) var(--ease-out) both; }
@keyframes hinweis-auf { from { opacity: 0; transform: translateY(14px); } }
@keyframes hinweis-dim { from { opacity: 0; } }

.hinweis__close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: none; color: var(--ink); cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.hinweis__close:focus-visible { outline-color: var(--brass-deep); border-radius: 50%; }
@media (hover: hover) { .hinweis__close:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); } }

.hinweis__label {
  display: inline-flex; align-items: center; gap: 0.75em;
  font-family: var(--font-label); font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-text);
  padding-right: 3rem;
}
.hinweis__label::before { content: ""; width: 0.55em; height: 0.55em; background: currentColor; flex: none; }
.hinweis__titel {
  margin-top: 0.9rem; padding-right: 2rem;
  font-size: clamp(2.2rem, 1.8rem + 2vw, 3rem); line-height: 0.92;
  color: var(--ink); text-wrap: balance;
}
.hinweis__termin {
  margin-top: 1.1rem; padding-block: 0.7rem;
  border-block: 1px dashed rgb(14 21 18 / .35);
  font-family: var(--font-label); font-size: 0.8rem; letter-spacing: 0.03em;
  color: var(--green-500); font-weight: 500;
}
.hinweis__text {
  margin-top: 1.1rem; max-width: 44ch;
  color: var(--ink-soft); font-size: 0.98rem; line-height: 1.6;
}
.hinweis__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  margin-top: 1.6rem;
}
.hinweis__wa {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  font-weight: 600; font-size: 0.98rem; color: var(--brass-text);
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 9px) / 100% 1px no-repeat;
  transition: color var(--dur-fast) var(--ease-out);
}
.hinweis__wa-ico { display: grid; place-items: center; }
.hinweis__wa-ico svg { width: 18px; height: 18px; }
.hinweis__wa:focus-visible, .hinweis .btn:focus-visible { outline-color: var(--brass-deep); }
@media (hover: hover) { .hinweis__wa:hover { color: var(--ink); } }

/* Auf kleinen Schirmen unten andocken — Daumen erreicht die Buttons. */
@media (max-width: 480px) {
  .hinweis { inset: auto 0 0 0; width: 100%; max-width: none; }
  .hinweis__karte { max-height: 85vh; max-height: 85dvh; padding-bottom: calc(1.75rem + env(safe-area-inset-bottom, 0px)); }
  .hinweis__actions .btn { width: 100%; }
  .hinweis__wa { margin-inline: auto; }
  @keyframes hinweis-auf { from { opacity: 0; transform: translateY(100%); } }
}

@media (prefers-reduced-motion: reduce) {
  .hinweis[open], .hinweis[open]::backdrop { animation: none; }
}

/* ---------- Weihnachts-Deko (hinweis.deko == "weihnachten") ----------
   Rein dekorativ, per aria-hidden aus dem Screenreader genommen.
   .hinweis__deko liegt hinter der Karte (Baum, Kopf), .hinweis__deko-vorn davor (Bart, Kugeln). */
.hinweis__deko, .hinweis__deko-vorn { position: absolute; inset: 0; pointer-events: none; }
.hinweis__baum { position: absolute; left: -58px; bottom: -34px; width: 120px; height: auto; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .45)); }
.hinweis__kugeln { position: absolute; top: 0; left: 7%; width: 190px; height: auto; filter: drop-shadow(0 4px 9px rgb(0 0 0 / .35)); }
/* top: -152px legt die Kinnlinie genau auf die Kartenkante: Gesicht darüber, nur der Bart fällt ins Textfeld. */
.hinweis__mann, .hinweis__bart { position: absolute; right: 78px; top: -152px; width: 170px; height: auto; }
.hinweis__mann { filter: drop-shadow(0 6px 14px rgb(0 0 0 / .45)); }
.hinweis__bart { filter: drop-shadow(0 8px 14px rgb(0 0 0 / .3)); }
/* Kugeln hängen oben links: Label rückt darunter. */
.hinweis--weihnachten .hinweis__karte { padding-top: clamp(3.4rem, 7vw, 3.9rem); }
.hinweis[open] .hinweis__deko > *, .hinweis[open] .hinweis__deko-vorn > * { animation: deko-rein var(--dur-slow) var(--ease-out) both; }
.hinweis[open] .hinweis__baum { animation-delay: 120ms; }
.hinweis[open] .hinweis__kugeln { animation-delay: 300ms; }
.hinweis[open] .hinweis__mann, .hinweis[open] .hinweis__bart { animation-delay: 220ms; }
@keyframes deko-rein { from { opacity: 0; transform: translateY(10px); } }
/* Schmal: Kopf nach links, Kugeln daneben, Baum entfällt (würde die Seite seitlich aufschieben). */
@media (max-width: 480px) {
  .hinweis__baum { display: none; }
  .hinweis__mann, .hinweis__bart { right: auto; left: 10px; top: -112px; width: 124px; }
  .hinweis__kugeln { left: auto; right: 64px; width: 132px; }
}
@media (prefers-reduced-motion: reduce) { .hinweis[open] .hinweis__deko > *, .hinweis[open] .hinweis__deko-vorn > * { animation: none; } }

/* Reiter am linken Rand — geschlossener Hinweis bleibt erreichbar.
   Vertikale Schrift, damit er schmal bleibt und den Inhalt nicht verdeckt. */
.hinweis-reiter {
  position: fixed; left: 0; top: 50%; z-index: 90;
  transform: translateY(-50%) rotate(180deg); /* Schrift läuft von unten nach oben */
  display: flex; align-items: center; gap: 0.65rem;
  padding: 1rem 0.6rem;
  border: 0; border-radius: 0;
  background: var(--brass); color: var(--ink);
  font-family: var(--font-label); font-size: 0.72rem;
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow-md);
  writing-mode: vertical-rl;
  transition: background-color var(--dur-fast) var(--ease-out), padding-left var(--dur-base) var(--ease-out);
}
.hinweis-reiter:focus-visible { outline-color: var(--ink); outline-offset: 2px; }
@media (hover: hover) { .hinweis-reiter:hover { background: #D6B37C; padding-left: 0.95rem; } }
.hinweis-reiter:not([hidden]) { animation: reiter-rein var(--dur-slow) var(--ease-out) both; }
@keyframes reiter-rein { from { opacity: 0; transform: translate(-100%, -50%) rotate(180deg); } }

/* Grüner Punkt als Blickfang — Termin steht noch an. */
.hinweis-reiter__punkt {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-500); flex: none;
}

/* Mobil gleiche Form wie am Desktop: quer gestellt am linken Rand,
   nur schmaler. So liegt er im Seitenrand und nicht auf dem Text. */
@media (max-width: 680px) {
  .hinweis-reiter { padding: 0.9rem 0.3rem; font-size: 0.64rem; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hinweis-reiter:not([hidden]) { animation: none; }
}
