/* Cookie banner and settings dialog. Tokens fall back to Flamm defaults. */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  box-sizing: border-box;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem;
  background: var(--weiss, #fff);
  color: var(--text, #222);
  border: 1px solid var(--grau, #d4d4d4);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .15);
  font: 0.9375rem/1.45 var(--font, system-ui, sans-serif);
}
.consent[hidden] { display: none; }
.consent-text { margin: 0 0 .75rem; }
.consent a { color: var(--rot, #b5132b); }
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.consent-actions .consent-btn { flex: 1 1 10rem; }
.consent-btn {
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border: 2px solid var(--rot, #b5132b);
  border-radius: 8px;
  background: var(--rot, #b5132b);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.consent-btn:hover { filter: brightness(.92); }
.consent-link {
  margin-top: .5rem;
  padding: .5rem 0;
  border: 0;
  background: none;
  color: var(--rot, #b5132b);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.consent :focus-visible,
.consent-dialog :focus-visible {
  outline: 3px solid var(--fokus, #1a5fb4);
  outline-offset: 2px;
}
body.has-consent-banner { padding-bottom: 11rem; }
@media (max-width: 40rem) {
  body.has-consent-banner { padding-bottom: 14rem; }
}

.consent-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 1.25rem;
  border: 0;
  border-radius: 12px;
  background: var(--weiss, #fff);
  color: var(--text, #222);
  font: 0.9375rem/1.45 var(--font, system-ui, sans-serif);
}
.consent-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.consent-dialog h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.consent-dialog a { color: var(--rot, #b5132b); }
.consent-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-top: 1px solid var(--grau, #d4d4d4);
}
.consent-row-title { font-weight: 600; }
.consent-row-desc { margin: .25rem 0 0; color: var(--text-leise, #555); }

/* Checkbox rendered as switch */
.consent-switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 3rem;
  height: 1.75rem;
  margin: 0;
  border-radius: 999px;
  background: var(--grau-dunkel, #767676);
  cursor: pointer;
  transition: background .15s;
}
.consent-switch::after {
  content: "";
  position: absolute;
  top: .2rem;
  left: .2rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.consent-switch:checked { background: var(--rot, #b5132b); }
.consent-switch:checked::after { transform: translateX(1.25rem); }
.consent-switch:disabled { opacity: .6; cursor: not-allowed; }
.consent-dialog .consent-actions { margin-top: 1rem; }
.consent-close { display: block; }

/* YouTube click-to-load */
[data-youtube-id] { position: relative; aspect-ratio: 16 / 9; background: #000; }
[data-youtube-id] img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-youtube-id] .yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .consent-switch, .consent-switch::after { transition: none; }
}
