/* Matflixx Cookie Consent — DSGVO-konform
 *
 * Banner: position:fixed unten, Buttons gleichwertig (Accept/Reject)
 * Modal:  Backdrop + Panel, scrollbar bei Bedarf
 * Theme:  matflixx-Orange (#fdbb64), dunkler Hintergrund
 */

:root {
  --mf-cc-orange: #fdbb64;
  --mf-cc-bg:     #1a1a2a;
  --mf-cc-fg:     #ffffff;
  --mf-cc-muted:  rgba(255,255,255,.72);
  --mf-cc-border: rgba(255,255,255,.18);
}

/* ─── Banner ─────────────────────────────────────────────────────────── */
.mf-cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 999998;
  background: var(--mf-cc-bg);
  color: var(--mf-cc-fg);
  box-shadow: 0 -10px 30px rgba(0,0,0,.25);
  border-top: 1px solid var(--mf-cc-border);
  padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  animation: mfCookieSlideUp .25s ease-out;
}
@keyframes mfCookieSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.mf-cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  align-items: center;
}
.mf-cookie-banner__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--mf-cc-fg);
}
.mf-cookie-banner__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mf-cc-muted);
}
.mf-cookie-banner__link {
  color: var(--mf-cc-orange);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mf-cookie-banner__link:hover { opacity: .85; }

.mf-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .mf-cookie-banner__inner { grid-template-columns: 1fr; }
  .mf-cookie-banner__actions { justify-content: stretch; }
  .mf-cookie-banner__actions .mf-cookie-btn { flex: 1 1 auto; }
}

/* ─── Buttons (Accept und Reject visuell gleichwertig) ────────────────── */
.mf-cookie-btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, opacity .15s ease;
  line-height: 1.2;
}
.mf-cookie-btn--primary {
  background: var(--mf-cc-orange);
  color: #1a1a2a;
  border-color: var(--mf-cc-orange);
}
.mf-cookie-btn--primary:hover { opacity: .9; }

.mf-cookie-btn--ghost {
  background: transparent;
  color: var(--mf-cc-fg);
  border-color: var(--mf-cc-fg);
}
.mf-cookie-btn--ghost:hover { background: rgba(255,255,255,.08); }

.mf-cookie-btn--link {
  background: transparent;
  color: var(--mf-cc-muted);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding-left: 8px;
  padding-right: 8px;
}
.mf-cookie-btn--link:hover { color: var(--mf-cc-fg); }

/* ─── Modal ──────────────────────────────────────────────────────────── */
.mf-cookie-lock { overflow: hidden; }

.mf-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.mf-cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  cursor: pointer;
  animation: mfCookieFade .15s ease-out;
}
@keyframes mfCookieFade { from { opacity: 0; } to { opacity: 1; } }

.mf-cookie-modal__panel {
  position: relative;
  background: var(--mf-cc-bg);
  color: var(--mf-cc-fg);
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0,0,0,.4);
  animation: mfCookieZoom .18s ease-out;
}
@keyframes mfCookieZoom {
  from { transform: scale(.97); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.mf-cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mf-cc-border);
}
.mf-cookie-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--mf-cc-fg);
}
.mf-cookie-modal__close {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--mf-cc-fg);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.mf-cookie-modal__close:hover { background: rgba(255,255,255,.08); }

.mf-cookie-modal__body {
  padding: 16px 20px;
  overflow-y: auto;
}
.mf-cookie-modal__intro {
  margin: 0 0 18px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mf-cc-muted);
}
.mf-cookie-modal__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--mf-cc-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 480px) {
  .mf-cookie-modal__footer .mf-cookie-btn { flex: 1 1 auto; }
}

/* ─── Kategorie-Zeilen ───────────────────────────────────────────────── */
.mf-cookie-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--mf-cc-border);
}
.mf-cookie-row:last-child { border-bottom: 0; }

.mf-cookie-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mf-cookie-row__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--mf-cc-fg);
  cursor: pointer;
}
.mf-cookie-row__desc {
  margin: 6px 0 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mf-cc-muted);
}
.mf-cookie-row__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.mf-cookie-row__always {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--mf-cc-orange);
  font-weight: 600;
}

/* iOS-Style Toggle-Switch (Checkbox visuell ersetzt) */
.mf-cookie-row__toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  cursor: pointer;
  inset: 0 0 0 auto;
}
.mf-cookie-row__toggle input[type="checkbox"]:disabled { cursor: not-allowed; }

.mf-cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transition: background-color .15s ease;
  flex: 0 0 auto;
  /* The real <input type=checkbox> is opacity:0 and absolutely positioned to
     overlay this switch, but the switch is position:relative and comes AFTER the
     input in the DOM, so it paints on top and swallows clicks — clicking the
     switch did nothing (only the text <label> toggled). Make the decorative
     switch (and its ::after thumb) click-through so the click reaches the
     checkbox underneath. */
  pointer-events: none;
}
.mf-cookie-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.mf-cookie-row__toggle input[type="checkbox"]:checked + .mf-cookie-switch {
  background: var(--mf-cc-orange);
}
.mf-cookie-row__toggle input[type="checkbox"]:checked + .mf-cookie-switch::after {
  transform: translateX(20px);
}
.mf-cookie-row__toggle input[type="checkbox"]:disabled + .mf-cookie-switch {
  background: var(--mf-cc-orange);
  opacity: .6;
}
.mf-cookie-row__toggle input[type="checkbox"]:focus-visible + .mf-cookie-switch {
  outline: 2px solid var(--mf-cc-orange);
  outline-offset: 2px;
}

/* ─── Footer-Link / -Icon (Cookie-Einstellungen erneut öffnen) ──────── */
/* Fallback-Text-Link (für Seiten ohne Standard-Footer) */
.mf-cookie-settings-link {
  display: inline-block;
  margin: 8px 12px;
  font-size: 13px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  opacity: .8;
}
.mf-cookie-settings-link:hover { opacity: 1; }

/* Icon-Button-Variante (Standard-Footer-Pages) — gelber/oranger Kreis
 * im matflixx-Brand-Stil, passt ins footer-card.right ohne den Footer
 * höher zu machen. Schiebt die Seiten-Links automatisch nach links. */
.mf-cookie-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 0 0 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--mf-cc-orange, #fdbb64);
  color: var(--midnight-blue-4, #1d2d49);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(253, 187, 100, .35),
              inset 0 -1px 0 rgba(0, 0, 0, .06);
  transition: background-color .15s ease, transform .12s ease,
              box-shadow .15s ease;
  font: inherit;
  line-height: 0;
  flex: 0 0 auto;
}
.mf-cookie-icon-btn:hover {
  background: #fcae47;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(253, 187, 100, .5),
              inset 0 -1px 0 rgba(0, 0, 0, .06);
}
.mf-cookie-icon-btn:active { transform: translateY(0) scale(.95); }
.mf-cookie-icon-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(253, 187, 100, .45),
              0 1px 4px rgba(253, 187, 100, .35);
}
.mf-cookie-icon-btn svg { display: block; width: 20px; height: 20px; }

@media (max-width: 479px) {
  .mf-cookie-icon-btn { margin-left: 14px; width: 32px; height: 32px; }
  .mf-cookie-icon-btn svg { width: 18px; height: 18px; }
}

