/* ─────────────────────────────────────────────────────────────
   Cookie-Consent (TDDDG §25 / DSGVO) — Design an die Hauptseite
   angelehnt: Farb-Token (--navy/--gold/--linen), Schriften
   (--serif/--sans/--mono), kleiner Radius, Buttons wie .btn.
   Die Variablen werden von der jeweiligen Seite (:root) geliefert.
   ───────────────────────────────────────────────────────────── */

.cc-hidden { display: none !important; }
.cc-no-scroll { overflow: hidden; }

/* ─── Bottom-Bar Banner ─── */
.cc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--paper);
  border-top: 1px solid var(--navy-line);
  box-shadow: 0 -12px 40px rgba(11, 28, 63, 0.12);
  padding: 24px 56px;
  animation: cc-rise 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes cc-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cc-banner-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cc-banner-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px;
}
.cc-banner-title {
  font-family: var(--serif); font-size: 24px; font-weight: 500;
  color: var(--navy); letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 8px;
}
.cc-banner-text {
  font-family: var(--sans); font-size: 14px; line-height: 1.65;
  color: var(--ink-soft); max-width: 720px;
}
.cc-banner-text a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 2px; }
.cc-banner-text a:hover { color: var(--navy); }
.cc-actions {
  display: grid; grid-auto-flow: row; gap: 10px; width: 240px; flex: none;
}

/* ─── Buttons (Größe/Position identisch → kein versteckter Ablehnen-Button) ─── */
.cc-btn {
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  padding: 13px 20px; min-height: 48px; border-radius: 2px; cursor: pointer;
  text-align: center; width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cc-btn--gold { background: var(--gold); color: #fff; }
.cc-btn--gold:hover { background: var(--gold-deep); }
.cc-btn--navy { background: var(--navy); color: #fff; }
.cc-btn--navy:hover { background: var(--navy-deep); }
.cc-btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.cc-btn--ghost:hover { border-color: var(--gold-deep); color: var(--gold-deep); }

/* ─── Modal (Einstellungen) ─── */
.cc-modal-overlay {
  position: fixed; inset: 0; z-index: 1001;
  background: rgba(7, 20, 46, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
}
.cc-modal {
  background: var(--paper);
  border: 1px solid var(--navy-line);
  box-shadow: 0 30px 80px rgba(11, 28, 63, 0.30);
  width: min(640px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; border-radius: 2px;
}
.cc-modal-head {
  position: relative;
  padding: 28px 56px 20px 32px; border-bottom: 1px solid var(--navy-line);
}
.cc-modal-close {
  position: absolute; top: 14px; right: 12px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy); border-radius: 2px; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.cc-modal-close:hover { background: var(--linen); color: var(--gold-deep); }
.cc-modal-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 12px;
}
.cc-modal-head h2 {
  font-family: var(--serif); font-size: 30px; font-weight: 500;
  color: var(--navy); letter-spacing: -0.02em; margin: 0;
}
.cc-modal-body { padding: 8px 32px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 0; }
.cc-cat {
  padding: 22px 0; border-bottom: 1px solid var(--navy-line);
}
.cc-cat:last-child { border-bottom: none; }
.cc-cat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.cc-cat-title {
  font-family: var(--serif); font-size: 20px; font-weight: 500;
  color: var(--navy); letter-spacing: -0.01em;
}
.cc-cat-desc {
  font-family: var(--sans); font-size: 13.5px; line-height: 1.6;
  color: var(--ink-soft); margin-top: 8px; max-width: 60ch;
}
.cc-service {
  margin-top: 14px; padding: 14px 16px;
  background: var(--linen); border: 1px solid var(--navy-line); border-radius: 2px;
}
.cc-service-name {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px;
}
.cc-service dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.cc-service dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-mute);
}
.cc-service dd { margin: 0; font-family: var(--sans); font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.cc-service a { color: var(--gold-deep); }

/* ─── Toggle-Switch (44px Touch-Ziel, sichtbarer Schalter 46×26 zentriert) ─── */
.cc-switch { position: relative; flex: none; width: 46px; height: 44px; }
.cc-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch .cc-slider {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 26px; border-radius: 999px;
  background: var(--ink-mute); transition: background 0.2s ease; pointer-events: none;
}
.cc-switch .cc-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.2s ease;
}
.cc-switch input:checked + .cc-slider { background: var(--gold); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { background: var(--navy); opacity: 0.55; cursor: not-allowed; }
.cc-switch input:focus-visible + .cc-slider { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.cc-cat-required {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-mute); align-self: center;
}
.cc-modal-foot {
  padding: 20px 32px 28px; border-top: 1px solid var(--navy-line);
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}

/* ─── Two-Click Karten-Platzhalter ─── */
.map-consent {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 28px;
  background: var(--linen);
}
.map-consent-icon { color: var(--gold-deep); opacity: 0.9; }
.map-consent p {
  font-family: var(--sans); font-size: 14px; line-height: 1.6;
  color: var(--ink-soft); max-width: 42ch; margin: 0;
}
.map-consent-remember {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 4px 8px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-mute); cursor: pointer;
}
.map-consent-remember input { accent-color: var(--gold); width: 20px; height: 20px; flex: none; }

/* ─── Footer-Link "Cookie-Einstellungen" als Button im Footer-Stil ─── */
.cc-reopen {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: inherit; text-align: left;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .cc-banner { padding: 22px 24px; }
}
/* Banner gestapelt + auf ~halbe Höhe gedeckelt + scrollbar — greift bei
   schmalen ODER niedrigen Viewports (Hochformat- UND Querformat-Smartphones).
   Text scrollt innerhalb, die drei Buttons bleiben immer sichtbar. */
@media (max-width: 720px), (max-height: 560px) and (max-width: 1024px) {
  .cc-banner {
    display: flex; padding: 16px 18px;
    max-height: 52svh;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .cc-banner-inner { grid-template-columns: 1fr; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
  .cc-banner-copy { overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
  .cc-banner-title { font-size: 19px; }
  .cc-banner-text { font-size: 14px; }
  .cc-actions { width: 100%; gap: 10px; }

  /* Einstellungen-Modal als Vollbild (inkl. Querformat-Handys) */
  .cc-modal-overlay { padding: 0; align-items: stretch; }
  .cc-modal { width: 100%; max-width: none; height: 100vh; height: 100svh; max-height: none; border: 0; border-radius: 0; }
  .cc-modal-head { padding: 20px 56px 16px 20px; }
  .cc-modal-head h2 { font-size: 24px; }
  .cc-modal-eyebrow { margin-bottom: 8px; }
  .cc-modal-body { padding: 4px 20px; }
  .cc-modal-foot { grid-template-columns: 1fr; padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .cc-cat-title { font-size: 19px; }
  .cc-cat-desc, .cc-service dd { font-size: 14px; }
}
@media (max-width: 640px) {
  /* Karten-Platzhalter kompakter, Text bleibt lesbar */
  .map-consent { padding: 18px; gap: 12px; }
}

/* Querformat-Smartphones: Der ~50%-Deckel ist eine Hochformat-Vorgabe (Banner
   soll den Screen nicht blockieren). Im flachen Querformat würde 52svh die drei
   Buttons abschneiden – daher mehr Höhe zulassen, Textbereich scrollt weiterhin. */
@media (max-height: 560px) and (orientation: landscape) and (max-width: 1024px) {
  .cc-banner { max-height: 88svh; }
}
