/* ------------------------------------------
   COOKIE BANNER – Grundlayout
------------------------------------------ */
#cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: clamp(320px, 100%, 430px);
  background: var(--bg-light);
  color: #000;
  border-radius: 10px;
  box-shadow: rgba(0,0,0,0.25) 0px 10px 50px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

body.dark-mode #cookie-banner {
  background: var(--bg-dark);
}

/* ------------------------------------------
   COOKIE BANNER – Mobile (≤ 797px)
------------------------------------------ */
@media (max-width: 797px) {
    #cookie-banner {
        left: 0;
        right: 0;
        margin: 0 auto;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        padding: 1rem 1.25rem;
    }
}

/* ------------------------------------------
   COOKIE BANNER – Reihen, Buttons & Icons
------------------------------------------ */
.cookie-banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cookie-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
  color: #000;
}

body.dark-mode .cookie-icon svg {
  color: #fff;
}

.cookie-buttons {
  display: flex;
  flex-grow: 1;
  justify-content: center;
  gap: 0.5rem;
}

/* ROUND BUTTONS (Ablehnen/Akzeptieren) */
.round-btn {
  flex: 1;
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
}

body.dark-mode .round-btn {
  border: 2px solid #fff;
  background: #fff;
  color: #000;
}

.round-btn:hover {
  background: #fff;
  color: #000;
}

body.dark-mode .round-btn:hover {
  background: #000;
  color: #fff;
}

/* ------------------------------------------
   SPEZIAL: Ablehnen Button invertiert
------------------------------------------ */
#cookie-decline {
    background: #fff !important;
    color: #000 !important;
}

body.dark-mode #cookie-decline {
    background: #000 !important;
    color: #fff !important;
}

#cookie-decline:hover {
    background: #000 !important;
    color: #fff !important;
}

body.dark-mode #cookie-decline:hover {
    background: #fff !important;
    color: #000 !important;
}

/* ------------------------------------------
   SETTINGS BUTTON (Rund)
------------------------------------------ */
.settings-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

body.dark-mode .settings-btn {
 border: 2px solid #fff;
  background: #000;
  color: #fff;
}

.settings-btn:hover {
  background: #000;
  color: #fff;
}

body.dark-mode .settings-btn:hover {
  background: #fff;
  color: #000;
}

.settings-btn svg {
  width: 24px;
  height: 24px;
}

/* ------------------------------------------
   COOKIE BANNER – Text & Links
------------------------------------------ */
.cookie-text {
  text-align: center;
  font-size: 0.75rem;
}

body.dark-mode .cookie-text {
  color: #fff;
}

.cookie-text a {
  color: #000;
  text-decoration: underline;
}

body.dark-mode .cookie-text a {
  color: #fff;
}

/* ===============================================================
   COOKIE OVERLAY / MODAL – Hintergrund
================================================================ */
#cookie-preferences-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

/* ---------------------------------------------------------------
   COOKIE MODAL – Box
---------------------------------------------------------------- */
.cookie-modal-box {
  width: clamp(320px, 90%, 430px);
  background: #fff;
  color: #000;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: rgba(0,0,0,0.25) 0px 10px 45px;
  animation: fadeIn 0.25s ease;
  position: relative;
}

body.dark-mode .cookie-modal-box {
  background: var(--bg-dark);
  color: #fff;
}

.cookie-modal-box {
  width: clamp(340px, 95%, 500px);
  padding: 1.75rem 1.5rem;
  max-height: 85vh;
  overflow-y: auto;
}

/* ------------------------------------------
   COOKIE MODAL – Handy (≤ 797px)
------------------------------------------ */
@media (max-width: 797px) {
    .cookie-modal-box {
        width: 92%;
        max-width: 420px;
        padding: 1.5rem;
    }
}

/* ------------------------------------------
   COOKIE MODAL – Mini Devices (≤ 360px)
------------------------------------------ */
@media (max-width: 360px) {
    .cookie-modal-box {
        width: 94%;
        padding: 1.25rem 1rem;
    }

    .cookie-modal-box h2 { font-size: 1.1rem; }
    .cookie-modal-sub { font-size: 0.8rem; }
    .cookie-option h3 { font-size: 0.9rem; }
    .cookie-option p { font-size: 0.75rem; }

    .switch { width: 48px; height: 26px; }

    .slider:before {
        height: 18px;
        width: 18px;
        bottom: 4px;
        left: 4px;
    }

    input:checked + .slider:before {
        transform: translateX(20px);
    }

    .modal-buttons button {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }

    .filter-overlay-close-btn {
        min-width: 36px;
        min-height: 36px;
        font-size: 26px;
    }
}

/* ------------------------------------------
   COOKIE MODAL – Titel + Untertitel
------------------------------------------ */
.cookie-modal-box h2 {
    margin: 1.25rem 0 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.cookie-modal-sub {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ------------------------------------------
   COOKIE MODAL – Optionen + Switches
------------------------------------------ */
.cookie-option {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-option.locked {
  opacity: 0.6;
}

.switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
  flex-shrink: 0;
  margin-left: 12px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #d4d4d8;
  border-radius: 9999px;
  transition: all 0.25s ease;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.15);
}

.slider:before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

input:checked + .slider {
  background: #34c759;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.switch.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ------------------------------------------
   COOKIE MODAL – Buttons (Speichern/Abbrechen)
------------------------------------------ */
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* ------------------------------------------
   COOKIE MODAL – Close Button (X)
------------------------------------------ */
.filter-overlay-close-btn {
    position: absolute !important;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
    user-select: none;
    border-radius: 50px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .filter-overlay-close-btn {
  color: var(--text-dark);
}

/* ------------------------------------------
   COOKIE MODAL – Header (Titelblock zentriert)
------------------------------------------ */
.cookie-modal-header {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    margin-top: 1.2rem;
    margin-bottom: 1rem;
}

.cookie-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.cookie-title i svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.cookie-title h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* ------------------------------------------
   CLICKABLE Switch-Cursor
------------------------------------------ */
.cookie-option:not(.locked) .switch,
.cookie-option:not(.locked) .slider,
.cookie-option:not(.locked) input {
    cursor: pointer;
}

.cookie-option:not(.locked) .slider:before {
    cursor: pointer;
}

/* ===========================================================
   ERGÄNZUNGEN (Switch kleiner + Texte schöner)
=========================================================== */
.smaller-switch {
    width: 46px !important;
    height: 24px !important;
}

.smaller-switch .slider:before {
    width: 18px !important;
    height: 18px !important;
    bottom: 3px !important;
    left: 3px !important;
}

.smaller-switch input:checked + .slider:before {
    transform: translateX(22px) !important;
}

/* Bessere Textausrichtung */
.option-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.option-info p {
    margin: 2px 0 0 0;
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Hover beschleunigen */
.round-btn {
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

.round-btn:hover {
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

body.dark-mode .round-btn,
body.dark-mode .round-btn:hover {
    transition: background-color 0.15s ease, color 0.15s ease !important;
}


/* UI – X Close Buttons Cookies */
.filter-overlay-close-btn {
  cursor: pointer;
}

.filter-overlay-close-btn:hover {
  color: var(--button-filter-hover-light);
}

body.dark-mode .filter-overlay-close-btn:hover {
  color: var(--button-search-hover-dark);
}

