/* ======================================================================
   Seorello – Cookie-Consent
   Farben: premium-orange #ed8000 · premium-900 #111111
   ====================================================================== */

.cc-root {
  --cc-orange: #ed8000;
  --cc-dark: #111111;
  --cc-text: #2b2b2b;
  --cc-muted: #6b7280;
  --cc-border: #e5e7eb;
  --cc-bg: #ffffff;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cc-text);
}

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

body.cc-open { overflow: hidden; }

.cc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, .55);
  backdrop-filter: blur(2px);
}

/* ---------- Dialog ---------- */

.cc-dialog {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--cc-bg);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  padding: 28px;
  animation: cc-in .28s ease-out;
}

@keyframes cc-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-dialog { animation: none; }
}

.cc-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cc-dark);
}

.cc-intro {
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--cc-muted);
}

/* ---------- Buttons ---------- */

.cc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cc-actions--settings {
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 20px;
}

/* Ablehnen und Akzeptieren sind bewusst gleich groß und gleich erreichbar
   (Anforderung der Datenschutzkonferenz an "gleichwertige" Buttons). */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 2px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
}

/* "Alle akzeptieren" und "Nur notwendige" sind optisch identisch – gleiche
   Farbe, gleiche Größe, gleiche Position. Damit ist keine der beiden Optionen
   hervorgehoben (Gleichwertigkeitsgebot der Datenschutzkonferenz). */
.cc-btn--accept,
.cc-btn--reject {
  background: var(--cc-orange);
  border-color: var(--cc-orange);
  color: #fff;
}
.cc-btn--accept:hover,
.cc-btn--reject:hover { background: #d47200; border-color: #d47200; }

/* "Auswahl speichern" ist sekundär – es bestätigt nur die Schalter oben. */
.cc-btn--save {
  background: #fff;
  border-color: var(--cc-dark);
  color: var(--cc-dark);
}
.cc-btn--save:hover { background: var(--cc-dark); color: #fff; }

.cc-btn:focus-visible,
.cc-link:focus-visible,
.cc-reopen:focus-visible {
  outline: 3px solid var(--cc-orange);
  outline-offset: 2px;
}

/* ---------- Textlinks ---------- */

.cc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
}

.cc-link,
.cc-settings-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--cc-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cc-link:hover,
.cc-settings-link:hover { color: var(--cc-dark); }

/* ---------- Kategorien ---------- */

.cc-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.cc-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--cc-border);
}
.cc-item:last-child { border-bottom: 0; }

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

.cc-item-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--cc-dark);
  cursor: pointer;
}

.cc-always {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cc-muted);
  white-space: nowrap;
}

.cc-item-desc {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--cc-muted);
}

.cc-item-services {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #9ca3af;
}

/* ---------- Schalter ---------- */

.cc-switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  cursor: pointer;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cc-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: background-color .2s;
  pointer-events: none;
}

.cc-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s;
}

.cc-switch input:checked + .cc-slider { background: var(--cc-orange); }
.cc-switch input:checked + .cc-slider::after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-slider { outline: 3px solid var(--cc-orange); outline-offset: 2px; }

/* ---------- Wieder-öffnen-Button ---------- */

.cc-reopen {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 2147482000;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--cc-dark);
  border: 1px solid var(--cc-border);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
  cursor: pointer;
  opacity: .7;
  transition: opacity .18s, transform .18s;
}
.cc-reopen:hover { opacity: 1; transform: translateY(-2px); }
.cc-reopen[hidden] { display: none; }

/* ---------- Blockierte Einbettungen ---------- */

.cc-embed {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin: 24px 0;
  padding: 24px;
  background: #f5f5f4;
  border: 1px dashed #d6d3d1;
  border-radius: 12px;
  text-align: center;
}

.cc-embed-inner { max-width: 460px; }

.cc-embed-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #111111;
}

.cc-embed-text {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #6b7280;
}

.cc-embed-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cc-embed-actions .cc-btn { min-height: 44px; padding: 10px 20px; }

.cc-embed-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
}

.cc-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .cc-dialog {
    bottom: 0;
    width: 100vw;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }

  .cc-actions,
  .cc-actions--settings { grid-template-columns: 1fr; }

  .cc-title { font-size: 18px; }

  .cc-embed { aspect-ratio: auto; padding: 22px 16px; }
}

/* ---------- Screenreader ---------- */

.cc-root .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
