/* ==========================================================================
   rm-consent — Einwilligungsbanner für rm-media.gmbh
   02.09.2026. Eigenständig, ohne Framework, ohne externe Aufrufe.

   Gestaltung im Stil der Website: dunkles Panel, Teal-Akzent (#4a8c88),
   Creme-Text. Das Panel ist selbst deckend und funktioniert deshalb auf den
   dunklen Galerie-Seiten genauso wie auf hellen Seiten (Impressum/Datenschutz).

   Alle Klassen sind mit .rmc- präfixiert, damit nichts mit dem Seiten-CSS
   kollidiert. Alle Regeln setzen ihre Werte explizit (kein Erben von
   Seitenstilen), weil jede Seite ihr eigenes CSS mitbringt.
   ========================================================================== */

.rmc-root {
  --rmc-bg: #16191b;
  --rmc-bg-2: #1e2225;
  --rmc-line: rgba(240, 237, 232, 0.14);
  --rmc-text: #f0ede8;
  --rmc-muted: rgba(240, 237, 232, 0.62);
  --rmc-accent: #4a8c88;
  --rmc-accent-h: #5ba9a4;
  --rmc-radius: 14px;
  --rmc-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--rmc-text);
}

/* --- Banner (erste Ebene) ------------------------------------------------ */

.rmc-banner {
  position: fixed;
  z-index: 2147483000;          /* über allem, auch über Sticky-Navigationen */
  left: 16px; right: 16px; bottom: 16px;
  max-width: 780px;
  margin: 0 auto;
  background: var(--rmc-bg);
  border: 1px solid var(--rmc-line);
  border-radius: var(--rmc-radius);
  box-shadow: var(--rmc-shadow);
  padding: 22px 24px;
  animation: rmc-up 0.32s ease both;
}
@keyframes rmc-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.rmc-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--rmc-text);
}
.rmc-text { margin: 0 0 16px; color: var(--rmc-muted); font-size: 14.5px; }
.rmc-text a { color: var(--rmc-accent); text-decoration: underline; }
.rmc-text a:hover { color: var(--rmc-accent-h); }

/* Knopfreihe: „Ablehnen" und „Akzeptieren" sind bewusst gleich groß und
   gleich auffällig — das verlangen die Aufsichtsbehörden (DSK-Beschluss). */
.rmc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.rmc-btn {
  appearance: none;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--rmc-line);
  background: var(--rmc-bg-2);
  color: var(--rmc-text);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  flex: 1 1 auto;
  min-width: 150px;
  text-align: center;
}
.rmc-btn:hover { background: #262b2e; border-color: rgba(240, 237, 232, 0.3); }
.rmc-btn:focus-visible { outline: 2px solid var(--rmc-accent-h); outline-offset: 2px; }

.rmc-btn--primary { background: var(--rmc-accent); border-color: var(--rmc-accent); color: #0d1211; }
.rmc-btn--primary:hover { background: var(--rmc-accent-h); border-color: var(--rmc-accent-h); }

/* Textlink „Einstellungen" — zweite Ebene, bewusst unauffälliger als die
   beiden gleichwertigen Hauptknöpfe, aber klar erreichbar. */
.rmc-link {
  appearance: none; background: none; border: 0; font: inherit; font-size: 14px;
  color: var(--rmc-muted); text-decoration: underline; cursor: pointer;
  padding: 12px 6px; flex: 0 0 auto;
}
.rmc-link:hover { color: var(--rmc-text); }
.rmc-link:focus-visible { outline: 2px solid var(--rmc-accent-h); outline-offset: 2px; border-radius: 4px; }

/* --- Einstellungen (zweite Ebene, modal) --------------------------------- */

.rmc-overlay {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(0, 0, 0, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: rmc-fade 0.2s ease both;
}
@keyframes rmc-fade { from { opacity: 0; } to { opacity: 1; } }

.rmc-dialog {
  background: var(--rmc-bg);
  border: 1px solid var(--rmc-line);
  border-radius: var(--rmc-radius);
  box-shadow: var(--rmc-shadow);
  width: 100%; max-width: 640px;
  max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
}
.rmc-dialog__head { padding: 22px 24px 14px; border-bottom: 1px solid var(--rmc-line); }
.rmc-dialog__body { padding: 6px 24px 18px; overflow-y: auto; flex: 1 1 auto; }
.rmc-dialog__foot {
  padding: 16px 24px 20px; border-top: 1px solid var(--rmc-line);
  display: flex; flex-wrap: wrap; gap: 10px;
}

/* Kategorie-Block */
.rmc-cat { padding: 16px 0; border-bottom: 1px solid var(--rmc-line); }
.rmc-cat:last-child { border-bottom: 0; }
.rmc-cat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rmc-cat__name { font-size: 15.5px; font-weight: 700; margin: 0; }
.rmc-cat__desc { margin: 6px 0 0; font-size: 14px; color: var(--rmc-muted); }
.rmc-cat__services { margin: 10px 0 0; font-size: 13.5px; color: var(--rmc-muted); }
.rmc-cat__services ul { margin: 4px 0 0; padding-left: 18px; }

/* Schalter */
.rmc-switch { position: relative; flex: 0 0 auto; width: 48px; height: 28px; }
.rmc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rmc-switch__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #3a4144; border: 1px solid var(--rmc-line);
  transition: background 0.18s; pointer-events: none;
}
.rmc-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--rmc-text); transition: transform 0.18s;
}
.rmc-switch input:checked + .rmc-switch__track { background: var(--rmc-accent); border-color: var(--rmc-accent); }
.rmc-switch input:checked + .rmc-switch__track::after { transform: translateX(20px); }
.rmc-switch input:focus-visible + .rmc-switch__track { outline: 2px solid var(--rmc-accent-h); outline-offset: 2px; }
.rmc-switch input:disabled { cursor: default; }
.rmc-switch input:disabled + .rmc-switch__track { opacity: 0.65; }

/* --- Platzhalter für blockierte Einbettungen ----------------------------- */

.rmc-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center;
  min-height: 180px; padding: 26px 22px;
  background: var(--rmc-bg-2);
  border: 1px dashed var(--rmc-line);
  border-radius: var(--rmc-radius);
  color: var(--rmc-text);
}
.rmc-placeholder__text { margin: 0; font-size: 14.5px; color: var(--rmc-muted); max-width: 46ch; }
.rmc-placeholder__text strong { color: var(--rmc-text); }

/* --- Kleine Bildschirme --------------------------------------------------- */

@media (max-width: 560px) {
  /* Auf schmalen Geräten frisst der Erklärtext sonst den halben Bildschirm. */
  .rmc-root { font-size: 14px; }
  .rmc-banner { left: 10px; right: 10px; bottom: 10px; padding: 16px 16px 14px; }
  .rmc-title { font-size: 16px; }
  .rmc-text { font-size: 13.5px; line-height: 1.45; margin-bottom: 13px; }
  .rmc-btn { padding: 11px 18px; }
  .rmc-link { padding: 9px 6px; }
  .rmc-actions { flex-direction: column; align-items: stretch; }
  .rmc-btn { width: 100%; flex: 0 0 auto; }
  .rmc-link { width: 100%; }
  .rmc-dialog__foot { flex-direction: column; }
  .rmc-dialog__foot .rmc-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rmc-banner, .rmc-overlay { animation: none; }
  .rmc-btn, .rmc-switch__track, .rmc-switch__track::after { transition: none; }
}
