/* ==========================================================================
   Lesen und Schenken — Cookie-/Consent-Banner  (lus-consent-v2)
   Eck-Banner UNTEN RECHTS, nicht-blockierend (kein Seiten-Dimm, keine
   Fokusfalle → Nutzer kann weiter browsen; Tracking lädt trotzdem erst nach
   Zustimmung dank Script-Gating in der JS).
   Prefix .lus-cc-*. Barrierefrei (Dialog, sichtbarer Fokus, Kontrast).
   ========================================================================== */

.lus-cc-hidden { display: none !important; }

/* Wrapper positioniert die Karte unten rechts; kein Vollbild-Overlay */
.lus-cc-overlay {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: auto;
  top: auto;
  z-index: 100000;
  width: calc(100% - 32px);
  max-width: 380px;
  background: none;
}

/* Banner / Dialog-Karte */
.lus-cc {
  width: 100%;
  background: #fff;
  color: #16233f;
  border: 1px solid #e2e2e2;
  border-top: 4px solid var(--lus-red, #d20007);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.28);
  font-family: "Open Sans", system-ui, sans-serif;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.lus-cc-body { padding: 18px 18px 6px; }
.lus-cc-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; color: #16233f; }
.lus-cc-text  { font-size: .85rem; line-height: 1.5; margin: 0 0 12px; color: #333; }
.lus-cc-text a { color: var(--lus-red, #d20007); text-decoration: underline; }

/* Kategorien */
.lus-cc-cats { margin: 0 0 6px; border-top: 1px solid #e5e5e5; }
.lus-cc-cat  { border-bottom: 1px solid #e5e5e5; padding: 11px 2px; }
.lus-cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lus-cc-cat-name { font-weight: 700; font-size: .9rem; }
.lus-cc-cat-desc { font-size: .8rem; color: #555; margin: 6px 0 0; line-height: 1.45; }

/* Toggle-Switch */
.lus-cc-switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.lus-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.lus-cc-slider {
  position: absolute; inset: 0; background: #bbb; border-radius: 26px; transition: background .2s;
  pointer-events: none;
}
.lus-cc-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.lus-cc-switch input:checked + .lus-cc-slider { background: var(--lus-red, #d20007); }
.lus-cc-switch input:checked + .lus-cc-slider::before { transform: translateX(20px); }
.lus-cc-switch input:disabled + .lus-cc-slider { background: #16233f; opacity: .55; }
.lus-cc-switch input:focus-visible + .lus-cc-slider { outline: 3px solid #16233f; outline-offset: 2px; }

/* Aktionen — im schmalen Eck-Banner gestapelt */
.lus-cc-actions {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 18px 18px;
}
.lus-cc-btn {
  width: 100%;
  font-size: .88rem; font-weight: 700; padding: 11px 14px; border-radius: 4px;
  cursor: pointer; border: 2px solid var(--lus-red, #d20007); line-height: 1.2;
  text-align: center;
}
.lus-cc-btn-primary { background: var(--lus-red, #d20007); color: #fff; order: -1; }
.lus-cc-btn-primary:hover { background: var(--lus-red-dark, #a50006); border-color: var(--lus-red-dark, #a50006); }
.lus-cc-btn-secondary { background: #fff; color: var(--lus-red, #d20007); }
.lus-cc-btn-secondary:hover { background: #fff5f5; }
.lus-cc-btn-plain { background: #fff; color: #16233f; border-color: #16233f; }
.lus-cc-btn-plain:hover { background: #eef1f6; }
.lus-cc-btn:focus-visible { outline: 3px solid #16233f; outline-offset: 2px; }

/* „Einstellungen"-Bereich toggelt */
.lus-cc[data-mode="simple"] .lus-cc-cats { display: none; }
.lus-cc[data-mode="settings"] .lus-cc-savebtn { display: block; }
.lus-cc[data-mode="simple"] .lus-cc-savebtn { display: none; }

/* Reopen-Link im Footer (per JS injiziert) */
.lus-cc-reopen {
  background: none; border: none; padding: 0; margin: 0;
  color: inherit; font: inherit; cursor: pointer; text-decoration: underline;
}
.lus-cc-reopen:hover { color: var(--lus-red, #d20007); }

/* Ganz kleine Screens: volle Breite mit Rand */
@media (max-width: 420px) {
  .lus-cc-overlay { right: 8px; bottom: 8px; width: calc(100% - 16px); }
}
