/*!
 * TELOS Cookie-Consent-Manager — Styles.
 * Nutzt die vorhandenen Design-Tokens aus assets/site.css (var(--ink), --paper, --acid, …)
 * mit Fallback-Werten, falls diese Datei einmal ohne site.css geladen wird.
 * Eigenständige Datei — site.css wird nicht verändert.
 */

#tc-banner,
#tc-overlay {
  font-family: "Geist", system-ui, sans-serif;
  color: var(--ink, #0A0A0A);
  box-sizing: border-box;
}
#tc-banner *,
#tc-overlay * {
  box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Banner (Erstbesuch)                                                 */
/* ------------------------------------------------------------------ */

.tc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: var(--paper, #F4F4F2);
  border-top: 1px solid var(--line-soft, rgba(10, 10, 10, .1));
  box-shadow: 0 -12px 32px -16px rgba(10, 10, 10, .25);
  padding: 22px 0;
  padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  animation: tc-slide-up .32s ease;
}
.tc-banner[hidden] { display: none; }

.tc-banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .tc-banner-inner { padding: 0 22px; }
}

.tc-banner-text {
  flex: 1 1 320px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3, #1C1C1C);
  margin: 0;
}
.tc-banner-text a {
  color: var(--ink, #0A0A0A);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tc-banner-text a:hover { color: var(--acid-deep, #7A9900); }

.tc-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
@media (max-width: 620px) {
  .tc-banner-actions { width: 100%; }
  .tc-banner-actions .tc-btn { flex: 1 1 auto; justify-content: center; }
}

/* ------------------------------------------------------------------ */
/* Buttons — bewusst gleich groß/gleich gewichtet (keine Dark Patterns) */
/* ------------------------------------------------------------------ */

.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: "Geist", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.tc-btn:hover { transform: translateY(-1px); }
.tc-btn:active { transform: translateY(0); }

.tc-btn-accept {
  background: var(--acid, #D4FF3A);
  color: var(--ink, #0A0A0A);
  border-color: var(--acid-2, #B8E029);
}
.tc-btn-accept:hover { background: var(--acid-2, #B8E029); }

/* "Nur notwendige" und "Einstellungen" teilen sich diese Klasse — identische Größe,
   Schriftgewicht und Border-Stärke wie der Accept-Button: das Ablehnen ist genauso
   leicht und genauso sichtbar wie das Zustimmen. */
.tc-btn-outline {
  background: transparent;
  color: var(--ink, #0A0A0A);
  border-color: var(--ink, #0A0A0A);
}
.tc-btn-outline:hover { background: rgba(10, 10, 10, .06); }

/* "Einwilligung widerrufen": Text-Button, gleiche Größe wie die anderen (kein Verstecken,
   kein Dark Pattern), farblich als Widerruf-Aktion gekennzeichnet. */
.tc-btn-ghost {
  background: transparent;
  color: var(--danger, #C1432B);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tc-btn-ghost:hover { background: rgba(193, 67, 43, .08); }

/* ------------------------------------------------------------------ */
/* Persistenter Widerruf-Button (immer sichtbar, unten links)          */
/* ------------------------------------------------------------------ */
.tc-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 900; /* unter Banner (1000) und Overlay (1100) */
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid var(--line, #2A2A2A);
  background: var(--ink, #0A0A0A);
  color: var(--paper, #F4F4F2);
  font-family: "Geist", sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(10, 10, 10, .22);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.tc-fab:hover { transform: translateY(-1px); background: var(--ink-2, #141414); }
.tc-fab[hidden] { display: none; }
.tc-fab-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--acid, #D4FF3A); flex-shrink: 0;
}
@media (max-width: 560px) {
  /* auf kleinen Displays nur der Punkt, damit der Button den Inhalt nicht verdeckt */
  .tc-fab { padding: 11px; }
  .tc-fab-text { display: none; }
}

/* ------------------------------------------------------------------ */
/* Overlay + Panel (Einstellungen)                                     */
/* ------------------------------------------------------------------ */

.tc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 10, 10, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: tc-fade-in .2s ease;
}
.tc-overlay[hidden] { display: none; }

.tc-panel {
  background: var(--white, #FFFFFF);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 34px 36px;
  box-shadow: 0 30px 70px -20px rgba(10, 10, 10, .45);
  animation: tc-panel-in .22s ease;
}
.tc-panel:focus { outline: none; }

.tc-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.tc-modal-title {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0;
}

.tc-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted-l, #6B6B6B);
  font-size: 22px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
}
.tc-close:hover { color: var(--ink, #0A0A0A); }
/* Bei erzwungener Erstauswahl gibt es bewusst keine Schließen-Option — eine
   Entscheidung ("Auswahl speichern" / "Alle akzeptieren") ist erforderlich. */
.tc-overlay.tc-forced .tc-close { display: none; }

.tc-modal-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted-l, #6B6B6B);
  margin: 0 0 26px;
}

.tc-cat {
  padding: 18px 0;
  border-top: 1px solid var(--line-soft, rgba(10, 10, 10, .1));
}
.tc-cat:last-of-type { padding-bottom: 6px; }

.tc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tc-cat-name {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink-3, #1C1C1C);
}

.tc-cat-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted-l, #6B6B6B);
  margin: 8px 0 0;
}

.tc-locked {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-l, #6B6B6B);
  background: var(--paper, #F4F4F2);
  border: 1px solid var(--line-soft, rgba(10, 10, 10, .1));
  border-radius: 999px;
  padding: 5px 12px;
  flex-shrink: 0;
}

/* Switch (role="switch" Button) */
.tc-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  background: var(--line-soft, rgba(10, 10, 10, .16));
  border: 1px solid var(--line-soft, rgba(10, 10, 10, .16));
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.tc-switch .tc-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white, #FFFFFF);
  box-shadow: 0 1px 3px rgba(10, 10, 10, .3);
  transition: transform .18s ease;
}
.tc-switch.is-on {
  background: var(--acid-deep, #7A9900);
  border-color: var(--acid-deep, #7A9900);
}
.tc-switch.is-on .tc-switch-knob { transform: translateX(18px); }

.tc-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft, rgba(10, 10, 10, .1));
}
@media (max-width: 460px) {
  .tc-panel-actions { flex-direction: column-reverse; align-items: stretch; }
  .tc-panel-actions .tc-btn { justify-content: center; }
}

/* ------------------------------------------------------------------ */
/* Fokus / Tastatur                                                    */
/* ------------------------------------------------------------------ */

.tc-btn:focus-visible,
.tc-switch:focus-visible,
.tc-close:focus-visible {
  outline: 2px solid var(--acid-deep, #7A9900);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Bewegung                                                            */
/* ------------------------------------------------------------------ */

@keyframes tc-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes tc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tc-panel-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-banner, .tc-overlay, .tc-panel {
    animation: none !important;
  }
  .tc-btn, .tc-switch, .tc-switch .tc-switch-knob, .tc-fab {
    transition: none !important;
  }
  .tc-btn:hover, .tc-btn:active, .tc-fab:hover {
    transform: none !important;
  }
}
