/*!
 * consent-ui.css — gemeinsames Design des Cookie-Banners für
 * aufnaeher.de, neumeyer-abzeichen.de und fahnenmasten-shop.de.
 *
 * Pro Seite wird nur die Akzentfarbe gesetzt:
 *   .cc2{ --cc2-accent:#1f5fd6;       Rahmen und Schalter
 *         --cc2-accent-ink:#1b4fb0;   Links und Icons - muss auf Weiss lesbar sein
 *         --cc2-accent-soft:#eef4ff;  Hover-Flaeche
 *   }
 *
 * Die drei Aktionsknöpfe sind bewusst GLEICHWERTIG (gleiche Größe, gleicher
 * Rahmen, gleiche Schrift) — "Ablehnen" darf optisch nicht schwächer sein als
 * "Akzeptieren", das ist der häufigste Abmahnpunkt.
 */

.cc2 *,
.cc2 *::before,
.cc2 *::after { box-sizing: border-box; }

/* ---------- Overlay ---------- */

.cc2 .cc2-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.cc2 .cc2-overlay.is-open { display: flex; }

html.cc2-lock,
body.cc2-lock { overflow: hidden; }

/* ---------- Karte ---------- */

.cc2 .cc2-card {
  width: 100%;
  max-width: 980px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
  padding: 40px 44px 32px;
  font-family: inherit;
  color: #1f2937;
  animation: cc2-in .22s ease-out;
}

@keyframes cc2-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.cc2 .cc2-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: center;
}

.cc2 .cc2-illu { display: block; width: 100%; height: auto; }

/* ---------- Text ---------- */

.cc2 .cc2-title {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  color: #111827;
  letter-spacing: -.01em;
}

.cc2 .cc2-text {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: #374151;
}

.cc2 .cc2-text:last-of-type { margin-bottom: 20px; }

.cc2 .cc2-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}

.cc2 .cc2-links a {
  color: var(--cc2-accent-ink, var(--cc2-accent, #1f5fd6));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc2 .cc2-links a:hover { text-decoration-thickness: 2px; }

.cc2 .cc2-links span { color: #d1d5db; }

.cc2 .cc2-divider {
  height: 1px;
  margin: 26px 0 22px;
  background: #e5e7eb;
  border: 0;
}

/* ---------- Buttons: bewusst gleichwertig ---------- */

.cc2 .cc2-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cc2 .cc2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border: 1.5px solid var(--cc2-accent, #1f5fd6);
  border-radius: 12px;
  background: #fff;
  color: var(--cc2-accent-ink, #111827);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.cc2 .cc2-btn:hover {
  background: var(--cc2-accent-soft, #eef4ff);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}

.cc2 .cc2-btn:focus-visible {
  outline: 3px solid var(--cc2-accent, #1f5fd6);
  outline-offset: 2px;
}

.cc2 .cc2-btn svg {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: var(--cc2-accent-ink, var(--cc2-accent, #1f5fd6));
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Farbig hinterlegt: "Nur notwendige verwenden" UND "Alle akzeptieren".
   Immer beide zusammen - waere nur Akzeptieren gefuellt, waere die
   Einwilligung angreifbar. --cc2-accent-on ist die auf der Akzentfarbe
   lesbare Textfarbe (weiss auf Blau, dunkel auf Gelb/Gold).
   Steht bewusst NACH .cc2-btn:hover, sonst gewinnt dessen Hover-Hintergrund. */

.cc2 .cc2-btn--fill {
  background: var(--cc2-accent, #1f5fd6);
  border-color: var(--cc2-accent, #1f5fd6);
  color: var(--cc2-accent-on, #fff);
}

.cc2 .cc2-btn--fill svg { stroke: var(--cc2-accent-on, #fff); }

.cc2 .cc2-btn--fill:hover {
  background: var(--cc2-accent, #1f5fd6);
  filter: brightness(.93);
}

/* ---------- Fußzeile ---------- */

.cc2 .cc2-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7280;
}

.cc2 .cc2-foot svg {
  flex: none;
  width: 16px;
  height: 16px;
  stroke: #9ca3af;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Detail-Einstellungen ---------- */

.cc2 .cc2-cats { margin: 4px 0 0; }

.cc2 .cc2-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid #f0f1f3;
}

.cc2 .cc2-cat:last-child { border-bottom: 0; }

.cc2 .cc2-cat-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.cc2 .cc2-cat-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #6b7280;
}

/* Dienste- und Cookie-Auflistung je Kategorie */
.cc2 .cc2-det { margin-top: 10px; font-size: 13.5px; color: #6b7280; }

/* Breite Cookie-Tabellen scrollen in sich, statt die Karte zu sprengen. */
.cc2 .cc2-det-svc { overflow-x: auto; }

.cc2 .cc2-det > summary {
  cursor: pointer;
  color: var(--cc2-accent-ink, var(--cc2-accent, #1f5fd6));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc2 .cc2-det > summary:focus-visible { outline: 3px solid var(--cc2-accent, #1f5fd6); outline-offset: 2px; }

.cc2 .cc2-det-svc { margin-top: 10px; }
.cc2 .cc2-det table { min-width: 320px; }
.cc2 .cc2-det-svc-name { margin: 0; font-weight: 700; color: #374151; }

.cc2 .cc2-det table {
  width: 100%;
  margin-top: 4px;
  border-collapse: collapse;
  font-size: 13px;
}

.cc2 .cc2-det td {
  padding: 4px 6px;
  border-top: 1px solid #eef2f7;
  vertical-align: top;
}

/* Schalter */
.cc2 .cc2-switch {
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  margin-top: 2px;
}

.cc2 .cc2-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cc2 .cc2-switch span {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background .18s ease;
  pointer-events: none;
}

.cc2 .cc2-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .18s ease;
}

.cc2 .cc2-switch input:checked + span { background: var(--cc2-accent, #1f5fd6); }
.cc2 .cc2-switch input:checked + span::after { transform: translateX(22px); }
.cc2 .cc2-switch input:disabled + span { opacity: .55; }
.cc2 .cc2-switch input:disabled { cursor: not-allowed; }
.cc2 .cc2-switch input:focus-visible + span { outline: 3px solid var(--cc2-accent, #1f5fd6); outline-offset: 2px; }

/* ---------- Wiederöffnen ---------- */

.cc2 .cc2-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 2147483000;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1.5px solid var(--cc2-accent, #1f5fd6);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .14);
}

.cc2 .cc2-fab.is-visible { display: inline-flex; }
.cc2 .cc2-fab:hover { background: var(--cc2-accent-soft, #eef4ff); }

.cc2 .cc2-fab svg {
  width: 16px;
  height: 16px;
  stroke: var(--cc2-accent-ink, var(--cc2-accent, #1f5fd6));
  fill: none;
  stroke-width: 1.8;
}

/* ---------- Schmale Viewports ---------- */

@media (max-width: 900px) {
  .cc2 .cc2-card { padding: 30px 24px 24px; border-radius: 18px; }
  .cc2 .cc2-body { grid-template-columns: 1fr; gap: 20px; }
  .cc2 .cc2-illu { max-width: 190px; margin: 0 auto; }
  .cc2 .cc2-title { font-size: 27px; text-align: center; }
  .cc2 .cc2-text { font-size: 15.5px; }
  .cc2 .cc2-links { justify-content: center; }
  .cc2 .cc2-actions { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 480px) {
  .cc2 .cc2-overlay { padding: 12px; }
  .cc2 .cc2-card { padding: 24px 18px 20px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .cc2 .cc2-title { font-size: 23px; }
  .cc2 .cc2-illu { max-width: 140px; }
  .cc2 .cc2-foot { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc2 .cc2-card { animation: none; }
  .cc2 .cc2-btn:hover { transform: none; }
}
