/* =========================================================================
   weinl-cookie-consent — cookie-consent.css
   Cookie-Banner in der weinl-Markenfarbe (Orange #f3842c). Tokens als --wcc-*
   und Buttons als .wcc-btn namespaced, um Kollisionen mit Betheme/WordPress
   zu vermeiden. Der Banner nutzt die Schrift der Seite (kein eigenes Font-Bundle).
   ========================================================================= */

/* === Design-Tokens (namespaced) === */
:root {
  --wcc-primary:        #f3842c;  /* weinl-Orange — Akzent, Primary-Button, Links */
  --wcc-primary-hover:  #cd6108;  /* Dunkleres Orange — Hover */
  --wcc-primary-dark:   #253646;  /* Dunkles Blau-Grau — Headlines, dunkle Texte */

  --wcc-text:           #161922;
  --wcc-text-muted:     #4b5563;
  --wcc-bg:             #ffffff;  /* Banner-Hintergrund */
  --wcc-bg-soft:        #f1f4f8;  /* Option-Karten, Maps-Placeholder */
  --wcc-border:         #d1d9e6;
  --wcc-border-soft:    #e5eaf1;

  --wcc-font:           "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wcc-space-3xs: 0.25rem;
  --wcc-space-2xs: 0.5rem;
  --wcc-space-xs:  0.75rem;
  --wcc-space-sm:  1rem;
  --wcc-space-md:  1.5rem;
  --wcc-space-lg:  2rem;
  --wcc-space-xl:  3rem;
  --wcc-space-2xl: 4rem;
  --wcc-container-pad: clamp(1rem, 5vw, 4rem);

  --wcc-radius-md: 8px;
  --wcc-radius-lg: 16px;

  --wcc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --wcc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);

  --wcc-transition: 0.2s ease;
}

/* === Backdrop-Overlay bei Force-Choice (erster Besuch) — grau hinterlegt === */
.cookie-banner-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 28, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 999990;
  animation: wccFadeIn 0.25s ease-out;
}
@keyframes wccFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body.is-consent-locked {
  overflow: hidden;
}

/* === Cookie-Banner === */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--wcc-bg);
  border-top: 3px solid var(--wcc-primary);
  box-shadow: 0 -16px 40px rgba(20, 23, 28, 0.18);
  z-index: 999991;
  animation: wccSlideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
  font-family: var(--wcc-font);
  color: var(--wcc-text);
  line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
@keyframes wccSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.cookie-banner *,
.cookie-banner *::before,
.cookie-banner *::after { box-sizing: border-box; }
.cookie-banner__inner {
  max-width: 720px;
  margin-inline: auto;
  padding: var(--wcc-space-lg) var(--wcc-container-pad);
  display: flex;
  flex-direction: column;
  gap: var(--wcc-space-sm);
}
.cookie-banner__head {
  display: flex;
  flex-direction: column;
  gap: var(--wcc-space-2xs);
}
.cookie-banner__heading {
  font-family: var(--wcc-font);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--wcc-primary-dark);
  margin: 0;
}
.cookie-banner__text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--wcc-text-muted);
  line-height: 1.55;
}
.cookie-banner__text a { color: var(--wcc-primary); }
.cookie-banner__details-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--wcc-primary);
  cursor: pointer;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  align-self: flex-start;
}
.cookie-banner__details-toggle::after {
  content: "\203A";
  display: inline-block;
  transition: transform var(--wcc-transition);
  font-size: 1.1em;
  line-height: 1;
}
.cookie-banner.is-details-open .cookie-banner__details-toggle::after {
  transform: rotate(90deg);
}
.cookie-banner__options {
  display: none;
  flex-direction: column;
  gap: var(--wcc-space-sm);
  padding-top: var(--wcc-space-sm);
  margin: 0;
}
.cookie-banner.is-details-open .cookie-banner__options { display: flex; }
.cookie-banner.is-settings .cookie-banner__options { display: flex; }
.cookie-banner.is-settings .cookie-banner__details-toggle { display: none; }

.cookie-banner__actions {
  display: flex;
  gap: var(--wcc-space-sm);
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .cookie-banner__actions { flex-direction: column-reverse; }
  .cookie-banner__actions .wcc-btn { width: 100%; }
}

/* === Buttons (namespaced .wcc-btn) === */
.wcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wcc-space-2xs);
  padding: 0.8125rem 1.5rem;
  font-family: var(--wcc-font);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border: 2px solid transparent;
  border-radius: var(--wcc-radius-md);
  transition: background var(--wcc-transition), color var(--wcc-transition), border-color var(--wcc-transition), transform var(--wcc-transition);
  cursor: pointer;
  text-decoration: none;
}
.wcc-btn--primary {
  background: var(--wcc-primary);
  color: #fff;
}
.wcc-btn--primary:hover, .wcc-btn--primary:focus {
  background: var(--wcc-primary-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.wcc-btn--ghost {
  background: transparent;
  color: var(--wcc-primary-dark);
  border-color: var(--wcc-primary-dark);
}
.wcc-btn--ghost:hover, .wcc-btn--ghost:focus {
  background: var(--wcc-primary-dark);
  color: #fff;
  text-decoration: none;
}

/* === Cookie-Option (Toggle-Switch + Label) === */
.cookie-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--wcc-space-md);
  align-items: flex-start;
  padding: var(--wcc-space-md);
  background: var(--wcc-bg-soft);
  border-radius: var(--wcc-radius-md);
  cursor: pointer;
}
.cookie-option--locked { cursor: default; opacity: 0.85; }
.cookie-option__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.cookie-option__switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}
.cookie-option__switch input:disabled { cursor: default; }
.cookie-option__slider {
  position: absolute;
  inset: 0;
  background: var(--wcc-border);
  border-radius: 999px;
  transition: background var(--wcc-transition);
}
.cookie-option__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--wcc-transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.cookie-option__switch input:checked + .cookie-option__slider {
  background: var(--wcc-primary);
}
.cookie-option__switch input:checked + .cookie-option__slider::before {
  transform: translateX(20px);
}
.cookie-option__switch input:focus-visible + .cookie-option__slider {
  outline: 2px solid var(--wcc-primary);
  outline-offset: 2px;
}
.cookie-option__body { display: flex; flex-direction: column; gap: 0.25rem; }
.cookie-option__title {
  font-weight: 600;
  color: var(--wcc-primary-dark);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.cookie-option__badge {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wcc-text-muted);
  background: #fff;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  border: 1px solid var(--wcc-border-soft);
}
.cookie-option__desc {
  font-size: 0.75rem;
  color: var(--wcc-text-muted);
  line-height: 1.5;
}
.cookie-option__services {
  list-style: none;
  padding: 0;
  margin: var(--wcc-space-2xs) 0 0;
  font-size: 0.75rem;
  color: var(--wcc-text-muted);
  line-height: 1.5;
}
.cookie-option__services li {
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid var(--wcc-border);
  margin-top: 0.25rem;
}
.cookie-option__services strong { color: var(--wcc-primary-dark); }

/* === Floating Settings-Icon (unten links, immer sichtbar) === */
.consent-fab {
  position: fixed;
  bottom: clamp(1rem, 3vw, 1.5rem);
  left: clamp(1rem, 3vw, 1.5rem);
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--wcc-primary);
  border: 1px solid var(--wcc-border);
  box-shadow: var(--wcc-shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99000;
  transition: background var(--wcc-transition), color var(--wcc-transition), transform var(--wcc-transition);
}
.consent-fab:hover {
  background: var(--wcc-primary);
  color: #fff;
  transform: translateY(-2px);
}
.consent-fab:focus-visible {
  outline: 2px solid var(--wcc-primary);
  outline-offset: 2px;
}

/* === Google-Maps-Consent (Click-to-Load) === */
.maps-consent {
  position: relative;
  width: 100%;
  min-height: 450px;
  background: var(--wcc-bg-soft);
  border: 1px solid var(--wcc-border-soft);
  border-radius: var(--wcc-radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--wcc-font);
}
.maps-consent.is-loaded {
  background: transparent;
  border-color: transparent;
  padding: 0;
}
.maps-consent__placeholder {
  max-width: 520px;
  padding: var(--wcc-space-2xl) var(--wcc-space-xl);
  text-align: center;
}
.maps-consent__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  color: var(--wcc-primary);
  border: 1px solid var(--wcc-border-soft);
  margin-bottom: var(--wcc-space-md);
  box-shadow: var(--wcc-shadow-sm);
}
.maps-consent__title {
  font-family: var(--wcc-font);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wcc-primary-dark);
  margin: 0 0 var(--wcc-space-sm);
}
.maps-consent__text {
  font-size: 0.9375rem;
  color: var(--wcc-text-muted);
  line-height: 1.6;
  margin: 0 0 var(--wcc-space-lg);
}
.maps-consent__text a { color: var(--wcc-primary); }
.maps-consent__alt {
  font-size: 0.8125rem;
  color: var(--wcc-text-muted);
  margin: var(--wcc-space-md) 0 0;
}
.maps-consent__alt a { color: var(--wcc-primary); }
.maps-consent iframe {
  width: 100%;
  height: 100%;
  min-height: 450px;
  border: 0;
  display: block;
}
@media (max-width: 640px) {
  .maps-consent { min-height: 360px; }
  .maps-consent iframe { min-height: 360px; }
}
