/* =============================================================
   Fiestalimo · Cookie-Consent (Premium, DSGVO)
   Eigenständige Design-Tokens -> konsistent auf ALLEN Seiten,
   unabhängig davon, welches Seiten-CSS geladen ist.
   ============================================================= */

.cc {
  --cc-gold: #c48a36;
  --cc-gold-d: #9c6722;
  --cc-ink: #17120c;
  --cc-ink-soft: #5f574e;
  --cc-muted: #8d8377;
  --cc-paper: #fffdf9;
  --cc-cream: #fbf7ef;
  --cc-line: rgba(63, 48, 28, 0.14);
  --cc-line-strong: rgba(196, 138, 54, 0.4);
  --cc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.cc[hidden] { display: none; }
.cc *,
.cc *::before,
.cc *::after { box-sizing: border-box; }

body.cc-locked { overflow: hidden; }

/* ---------------- Banner ---------------- */
.cc-banner {
  position: fixed;
  z-index: 350;
  left: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  width: min(432px, calc(100vw - 28px));
  padding: 24px 24px 22px;
  border: 1px solid var(--cc-line);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.82);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    0 2px 8px rgba(46, 32, 16, 0.06),
    0 30px 70px rgba(46, 32, 16, 0.22);
  color: var(--cc-ink);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.45s var(--cc-ease), transform 0.55s var(--cc-ease);
}

.cc-banner[hidden] { display: none; }

.cc-banner.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* dezenter Gold-Schimmer oben */
.cc-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cc-gold), transparent);
  opacity: 0.85;
}

.cc-banner__glow {
  position: absolute;
  top: -60px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 138, 54, 0.22), transparent 65%);
  pointer-events: none;
}

.cc-banner__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cc-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--cc-gold-d);
  background: linear-gradient(160deg, rgba(196, 138, 54, 0.16), rgba(196, 138, 54, 0.06));
  border: 1px solid var(--cc-line-strong);
}

.cc-ico svg { width: 22px; height: 22px; }

.cc-banner__title {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
  color: var(--cc-ink);
}

.cc-banner__text {
  margin: 0 0 18px;
  color: var(--cc-ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cc-banner__text a {
  color: var(--cc-gold-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner__actions {
  display: grid;
  gap: 10px;
}

.cc-banner__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---------------- Buttons ---------------- */
.cc-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--cc-ease), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cc-btn:active { transform: translateY(1px); }

.cc-btn--gold {
  color: #fff;
  background: linear-gradient(135deg, var(--cc-gold) 0%, var(--cc-gold-d) 100%);
  box-shadow: 0 10px 26px rgba(196, 138, 54, 0.32);
}
.cc-btn--gold:hover { box-shadow: 0 14px 32px rgba(196, 138, 54, 0.42); transform: translateY(-1px); }

.cc-btn--outline {
  color: var(--cc-ink);
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--cc-line-strong);
}
.cc-btn--outline:hover { border-color: var(--cc-gold); background: #fff; }

.cc-btn--ghost {
  color: var(--cc-ink-soft);
  background: transparent;
  border-color: var(--cc-line);
}
.cc-btn--ghost:hover { color: var(--cc-ink); border-color: var(--cc-line-strong); }

/* ---------------- Einstellungs-Dialog ---------------- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 40px);
}
.cc-modal[hidden] { display: none; }

.cc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 18, 12, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.32s ease;
}
.cc-modal.is-in .cc-modal__backdrop { opacity: 1; }

.cc-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--cc-paper);
  border: 1px solid var(--cc-line);
  border-radius: 22px;
  box-shadow: 0 40px 90px rgba(29, 18, 6, 0.4);
  outline: none;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.34s var(--cc-ease), transform 0.4s var(--cc-ease);
  overflow: hidden;
}
.cc-modal.is-in .cc-modal__panel { opacity: 1; transform: translateY(0) scale(1); }

.cc-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--cc-line);
}

.cc-modal__head h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--cc-ink);
}

.cc-modal__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--cc-ink);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.cc-modal__close:hover { transform: rotate(90deg); border-color: var(--cc-gold); }
.cc-modal__close svg { width: 18px; height: 18px; }

.cc-modal__body {
  padding: 8px clamp(20px, 3vw, 30px) 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cc-modal__intro {
  margin: 16px 0 6px;
  color: var(--cc-ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}
.cc-modal__intro a { color: var(--cc-gold-d); text-decoration: underline; text-underline-offset: 2px; }

/* Kategorie-Zeile */
.cc-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--cc-line);
}
.cc-cat:last-child { border-bottom: 0; }

.cc-cat__text h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--cc-ink);
}

.cc-cat__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(196, 138, 54, 0.14);
  color: var(--cc-gold-d);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.cc-cat__text p {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Toggle-Switch */
.cc-switch {
  flex: 0 0 auto;
  position: relative;
  width: 52px;
  height: 30px;
  margin-top: 2px;
}
.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.cc-switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #ddd7cc;
  transition: background 0.25s var(--cc-ease);
}
.cc-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s var(--cc-ease);
}
.cc-switch input:checked + .cc-switch__track {
  background: linear-gradient(135deg, var(--cc-gold), var(--cc-gold-d));
}
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(22px); }
.cc-switch input:focus-visible + .cc-switch__track {
  box-shadow: 0 0 0 3px rgba(196, 138, 54, 0.3);
}
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch--locked .cc-switch__track { background: linear-gradient(135deg, #cbb98f, #b7a06a); opacity: 0.85; }

.cc-modal__foot {
  display: flex;
  gap: 10px;
  padding: 16px clamp(20px, 3vw, 30px) 20px;
  border-top: 1px solid var(--cc-line);
  background: linear-gradient(180deg, rgba(196, 138, 54, 0.03), transparent);
}
.cc-modal__foot .cc-btn { flex: 1 1 0; }

/* ---------------- YouTube-/Medien-Consent-Overlay ---------------- */
.video-showcase__player { position: relative; }

.video-consent {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: #f4ecdd;
  background:
    linear-gradient(160deg, rgba(23, 18, 12, 0.86), rgba(23, 18, 12, 0.72)),
    #1a130a;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.video-consent[hidden] { display: none; }

.video-consent__inner {
  max-width: 340px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.video-consent__ic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(196, 138, 54, 0.18);
  color: #e7c78a;
}
.video-consent__ic svg { width: 24px; height: 24px; }
.video-consent p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(244, 236, 221, 0.86);
}
.video-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 4px;
}
.video-consent__btn {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cc-gold, #c48a36), var(--cc-gold-d, #9c6722));
  color: #fff;
  font: 700 0.82rem/1 "Manrope", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.video-consent__link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: rgba(244, 236, 221, 0.8);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 560px) {
  .cc-banner {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(100%);
  }
  .cc-banner.is-in { transform: translateY(0); }
  .cc-modal__panel {
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
  }
  .cc-modal { padding: 0; align-items: flex-end; }
  .cc-modal__foot { flex-direction: column; }
}

@media (min-width: 561px) and (max-width: 900px) {
  /* Tablet: etwas breiter, mittig-unten wirkt ruhiger */
  .cc-banner { width: min(520px, calc(100vw - 40px)); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner,
  .cc-modal__panel,
  .cc-modal__backdrop,
  .cc-switch__track,
  .cc-switch__track::after { transition: none; }
  .cc-banner { transform: none; }
}

/* Zentraler WhatsApp-Kontakt: ausschließlich auf Mobilgeräten sichtbar */
.mobile-whatsapp {
  display: none;
}

@media (min-width: 681px) {
  .mobile-whatsapp {
    display: none !important;
  }
}

.mobile-whatsapp .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 680px) {
  .mobile-whatsapp {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    color: #fff;
    background-color: #25d366;
    box-shadow:
      0 12px 30px rgba(16, 94, 50, 0.3),
      0 3px 9px rgba(18, 15, 11, 0.16);
    transition:
      transform 180ms ease,
      box-shadow 180ms ease,
      background-color 180ms ease;
  }

  .mobile-whatsapp svg {
    width: 29px;
    height: 29px;
    fill: currentColor;
  }

  .mobile-whatsapp svg path:first-child {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-whatsapp:active {
    background-color: #1fbd5a;
    box-shadow: 0 7px 18px rgba(16, 94, 50, 0.26);
    transform: scale(0.94);
  }
}
