/*! SC Cookie Consent 1.1.0 */
:root {
  --scc-primary: #1d4ed8;
  --scc-primary-contrast: #ffffff;
  --scc-bg: #ffffff;
  --scc-fg: #111827;
  --scc-muted: #4b5563;
  --scc-border: #e5e7eb;
  --scc-soft: #f3f4f6;
  --scc-radius: 14px;
  --scc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --scc-z: 999990;
}

.scc-banner, .scc-overlay, .scc-fab, .scc-embed { font-family: var(--scc-font); box-sizing: border-box; }
.scc-banner *, .scc-overlay *, .scc-embed * { box-sizing: border-box; }

/* ---------- Banner ---------- */
.scc-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: var(--scc-z);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  left: calc(16px + env(safe-area-inset-left, 0px)); right: calc(16px + env(safe-area-inset-right, 0px));
  max-width: 720px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; margin: 0 auto; padding: 20px 22px;
  background: var(--scc-bg); color: var(--scc-fg);
  border: 1px solid var(--scc-border); border-radius: var(--scc-radius);
  box-shadow: 0 12px 40px rgba(17, 24, 39, .18);
  animation: scc-up .25s ease-out;
}
.scc-banner:focus { outline: none; }
.scc-title { margin: 0 0 8px; font: 700 18px/1.3 var(--scc-font); color: var(--scc-fg); letter-spacing: normal; text-transform: none; }
.scc-text { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--scc-muted); }
.scc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scc-links { margin: 12px 0 0; font-size: 13px; color: var(--scc-muted); }
.scc-links a { color: var(--scc-muted); text-decoration: underline; }
.scc-links a:hover { color: var(--scc-fg); }

/* ---------- Buttons ---------- */
.scc-btn {
  appearance: none; -webkit-appearance: none; margin: 0; flex: 1 1 auto;
  min-height: 44px; padding: 10px 16px; border-radius: 10px;
  border: 2px solid var(--scc-primary); background: var(--scc-primary); color: var(--scc-primary-contrast);
  font: 600 14.5px/1.2 var(--scc-font); text-align: center; text-transform: none; letter-spacing: normal;
  cursor: pointer; box-shadow: none; transition: filter .15s, background .15s;
}
.scc-btn:hover { filter: brightness(1.1); }
.scc-btn--ghost { background: transparent; color: var(--scc-primary); }
.scc-btn--ghost:hover { background: var(--scc-soft); filter: none; }
.scc-btn:focus-visible, .scc-close:focus-visible, .scc-fab:focus-visible,
.scc-switch__input:focus-visible + .scc-switch__track, .scc-cat__details summary:focus-visible {
  outline: 3px solid var(--scc-primary); outline-offset: 2px;
}

/* ---------- Dialog ---------- */
.scc-lock, .scc-lock body { overflow: hidden !important; }
.scc-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 999991;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(17, 24, 39, .55); animation: scc-fade .2s ease-out;
}
.scc-modal {
  display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: calc(100vh - 32px);
  background: var(--scc-bg); color: var(--scc-fg); border-radius: var(--scc-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); overflow: hidden;
}
@supports (height: 100dvh) { .scc-modal { max-height: calc(100dvh - 32px); } }
.scc-modal:focus { outline: none; }
.scc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--scc-border); }
.scc-modal__head .scc-title { margin: 0; }
.scc-close {
  appearance: none; border: 0; background: transparent; color: var(--scc-muted);
  width: 40px; height: 40px; border-radius: 8px; font: 400 28px/1 var(--scc-font); cursor: pointer; padding: 0; flex: none;
}
.scc-close:hover { background: var(--scc-soft); color: var(--scc-fg); }
.scc-modal__body { padding: 18px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
.scc-modal__intro { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--scc-muted); }
.scc-modal__foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--scc-border); background: var(--scc-bg); }
.scc-meta { margin: 14px 0 0; font-size: 12px; color: var(--scc-muted); word-break: break-all; }

/* ---------- Kategorien ---------- */
.scc-cats { display: flex; flex-direction: column; gap: 10px; }
.scc-cat { border: 1px solid var(--scc-border); border-radius: 12px; padding: 14px 16px; }
.scc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scc-cat__label { font-weight: 650; font-size: 15.5px; color: var(--scc-fg); cursor: pointer; }
.scc-cat__always { font-size: 13px; font-weight: 600; color: #047857; white-space: nowrap; }
.scc-cat__desc { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--scc-muted); }
.scc-cat__details { margin-top: 8px; font-size: 13.5px; }
.scc-cat__details summary { cursor: pointer; color: var(--scc-primary); font-weight: 600; }
.scc-cat__details ul { margin: 6px 0 0; padding-left: 20px; color: var(--scc-muted); }
.scc-cat__details li { margin: 2px 0; }

/* ---------- Schalter ---------- */
.scc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.scc-switch__input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.scc-switch__track { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 999px; background: #d1d5db; transition: background .2s; }
.scc-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.scc-switch__input:checked + .scc-switch__track { background: var(--scc-primary); }
.scc-switch__input:checked + .scc-switch__track::after { transform: translateX(20px); }

/* ---------- Schwebender Button ---------- */
.scc-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 999989;
  left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 46px; height: 46px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--scc-border); background: var(--scc-bg); color: var(--scc-primary);
  box-shadow: 0 4px 14px rgba(17, 24, 39, .18); cursor: pointer; transition: transform .15s;
}
.scc-fab:hover { transform: scale(1.06); }
@media print { .scc-banner, .scc-fab, .scc-overlay { display: none !important; } }

/* ---------- Blockierte Einbettungen ---------- */
.scc-embed { position: relative; width: 100%; max-width: 100%; }
.scc-embed iframe { max-width: 100%; }
.scc-embed:not(.is-loaded) { aspect-ratio: var(--scc-ar, 16 / 9); min-height: 230px; background: var(--scc-soft); border-radius: 12px; overflow: hidden; }
.scc-embed:not(.is-loaded) iframe { display: none !important; }
.scc-embed__ph {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px; text-align: center; overflow: auto; color: var(--scc-fg);
}
.scc-embed__title { margin: 0; font-weight: 700; font-size: 16px; }
.scc-embed__text { margin: 0 0 6px; max-width: 460px; font-size: 13.5px; line-height: 1.5; color: var(--scc-muted); }
.scc-embed__text a { color: inherit; text-decoration: underline; }
.scc-embed__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.scc-embed__actions .scc-btn { flex: 0 1 auto; }
/* Responsive WordPress-Embeds (wp-embed-responsive) */
.wp-has-aspect-ratio .wp-block-embed__wrapper > .scc-embed { position: absolute; top: 0; right: 0; bottom: 0; left: 0; min-height: 0; aspect-ratio: auto; }

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
  .scc-banner { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 16px; max-height: calc(100vh - 16px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .scc-text { font-size: 14px; }
  .scc-actions, .scc-modal__foot { flex-direction: column; }
  .scc-overlay { padding: 0; align-items: flex-end; }
  .scc-modal { max-width: none; border-radius: var(--scc-radius) var(--scc-radius) 0 0; max-height: 92vh; }
  @supports (height: 100dvh) { .scc-modal { max-height: 92dvh; } }
  .scc-modal__head, .scc-modal__body, .scc-modal__foot { padding-left: 16px; padding-right: 16px; }
}

/* Querformat auf Handys: Banner kompakter */
@media (max-height: 500px) and (orientation: landscape) {
  .scc-banner { max-height: calc(100vh - 16px); overflow-y: auto; padding: 12px 16px; }
  .scc-text { margin-bottom: 10px; }
  .scc-actions { flex-direction: row; }
  .scc-modal { max-height: calc(100vh - 16px); }
}
/* Ältere Browser ohne aspect-ratio */
@supports not (aspect-ratio: 1 / 1) { .scc-embed:not(.is-loaded) { height: 0; padding-top: 56.25%; } }
/* Erzwungene Farben (Windows-Kontrastmodus) */
@media (forced-colors: active) { .scc-btn, .scc-banner, .scc-modal, .scc-fab { border: 2px solid CanvasText; } .scc-switch__track { border: 1px solid CanvasText; } }

@keyframes scc-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes scc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scc-banner, .scc-overlay { animation: none; } .scc-switch__track, .scc-switch__track::after { transition: none; } }
.scc-banner[hidden]{display:none!important}
