/* Variablen-Definitionen am Anfang */
:root {
  --om-panel-bg: #ffffffb0;
  --om-dark-bg: #ffffff;
  --om-dark-card: #f8fafc;
  --om-purple: #0d31c9;
  --om-purple-hover: #0d31d9;
  --om-text-main: #000000;
  --om-text-muted: #333333;
  --om-border: #e2e8f0;
}


/* Erhöhte Spezifität, um Core-Klassen zu überschreiben */
div.om-cookie-panel {
  position: fixed !important;
  bottom: 30px !important;
  left: 50% !important;
  transform: translateY(150%) translateX(-50%) !important; /* Startet versteckt unter dem Bildschirm */
  z-index: 999999 !important; /* Sicherstellen, dass er über Navigationen liegt */

  background: var(--om-panel-bg, #12131a);
  backdrop-filter: blur(15px);
  color: var(--om-text-main, #fff);
  border-radius: 16px;
  border: 1px solid var(--om-border); /* Dünner Rahmen hinzugefügt für das helle Theme */
  padding: 30px;

  /*padding-bottom:10px;*/

  max-width: 1000px;
  width: 90% !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  text-align: left;
  box-sizing: border-box;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;

  /* Begrenzt die Gesamthöhe des Banners auf dem Bildschirm */
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Sichtbarer Zustand wenn aktiv */
div.om-cookie-panel.active {
  transform: translateY(0) translateX(-50%) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}


div.om-cookie-panel.om-cookie-panel-position-1 {
  bottom: auto !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, 100%) !important;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s;
}

div.om-cookie-panel.om-cookie-panel-position-1.active {
  transform: translate(-50%, -50%) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}








/* --- Re-Open Button unten links --- */
#cookiecontrol-btn {
    cursor:pointer;
  position: fixed;
  left: 10px;
  z-index: 9999999;
  bottom: 10px;
  background: var(--om-purple);
  border-radius: 30px;
  border: none;
  height: 34px;
  padding: 0;
  padding-left: 5px;
  padding-right: 5px;
  padding-bottom: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}
#cookiecontrol-btn-svg {
  width: 24px;
  height: 24px;
  transform: rotate(180deg);
}
#cookiecontrol-btn span {
  display: none;
  color: #fff;
}
#cookiecontrol-btn:hover span {
  display: inline-block;
  font-size: 14px;
  padding-right: 6px;
  padding-top: 2px;
  padding-left: 2px;
}




/* Flex-Wrapper für das Layout-Verhalten */
.om-cookie-panel__layout-modern {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Layout Aufteilung Oben (Text links, Buttons rechts) */
.om-cookie-panel__top-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0; /* Verhindert, dass der obere Teil zusammengedrückt wird */
}

@media (min-width: 768px) {
  .om-cookie-panel__top-section {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .om-cookie-panel__text-block {
    flex: 1;
    padding-right: 30px;
  }
  .om-cookie-panel__top-buttons {
    width: 240px;
    flex-shrink: 0;
  }
}

/* Geändert: Der Tab-Container selbst scrollt nicht mehr, sondern füllt flexibel den Raum */
.om-cookie-panel__tab[data-omcookie-panel-tab="info"] {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 15px;
}

/* Mittlerer Bereich (Erweiterte Optionen Wrapper) */
.om-cookie-panel__middle-section {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}



/* KORREKTUR: Jetzt ist exklusiv die Liste der Cookie-Boxen scrollbar */
.cookie-panel__groups-list {
  flex: 1 1 auto;
  overflow-y: auto;
  border-radius: 10px;
}

/* Scrollbalken-Styling für Webkit (Chrome, Safari, Edge) */
.cookie-panel__groups-list::-webkit-scrollbar {
  width: 6px;
}
.cookie-panel__groups-list::-webkit-scrollbar-track {
  background: transparent;
}
.cookie-panel__groups-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

/* Buttons Allgemein */
.om-cookie-panel__top-buttons,
.om-cookie-panel__bottom-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Buttons unten - FIXIERT am Ende, da außerhalb der scrollbaren Liste */
.om-cookie-panel__bottom-buttons {
  flex-direction: row;
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 15px;
  flex-shrink: 0;
}

.om-cookie-panel .cookie-panel__button {
  border: none;
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease;
}

/* Button-Varianten */
.om-cookie-panel .cookie-panel__button--primary {
  background: var(--om-purple);
  color: #fff;
}
.om-cookie-panel .cookie-panel__button--primary:hover {
  background: var(--om-purple-hover);
}

.om-cookie-panel .cookie-panel__button--secondary {
  background: #222430;
  color: #fff;
  border: none;
}
.om-cookie-panel .cookie-panel__button--secondary:hover {
  background: #2b2d3d;
}

.om-cookie-panel .cookie-panel__button--link {
  background: #eeeeee;
  color: var(--om-text-muted);
}

.cookie-panel__group-row {
  background: #ffffffd0;
  border-radius: 15px;
  padding: 15px 20px;
  margin-bottom: 10px;
  border: 1px solid var(--om-border);
}
.cookie-panel__group-row:last-child {
    margin-bottom: 0 !important;
}



.cookie-panel__group-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-panel__group-text h4 {
  margin: 0 0 5px 0;
  color: #000000;
}

.cookie-panel__group-description {
  color: var(--om-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

/* iOS Toggle Schalter im Light/Dark Mode */
.om-cookie-panel .cookie-panel__checkbox {
  position: absolute;
  opacity: 0;
}

.om-cookie-panel .checkbox-toggle {
  background: #cbd5e1; /* Angenehmeres Grau für das helle Design */
  border-radius: 100px;
  display: block;
  height: 24px;
  width: 44px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.om-cookie-panel .checkbox-toggle:before {
  content: '';
  background: #fff;
  border-radius: 50%;
  display: block;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  position: absolute;
  transition: left 0.2s;
}

.om-cookie-panel .cookie-panel__checkbox:checked + label .checkbox-toggle {
  background: var(--om-purple);
}

.om-cookie-panel .cookie-panel__checkbox:checked + label .checkbox-toggle:before {
  left: 23px;
}

/* Verstecken-Steuerung */
.om-cookie-panel .tab-hidden {
  display: none !important;
}

/* Container, der horizontales Scrollen auf Smartphones erlaubt */
.cookie-panel__sub-cookies-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
}

.om-cookie-panel__text-block a {
    color: var(--om-purple);
    text-decoration: underline;
    font-weight: 500;
}


/* Zeiger auf "nicht erlaubt" setzen für den gesamten Container, wenn deaktiviert */
.cookie-panel__checkbox-container--disabled,
.cookie-panel__checkbox-container--disabled label,
.cookie-panel__checkbox-container--disabled .checkbox-toggle {
  cursor: not-allowed !important;
}

/* Optische Abschwächung für den deaktivierten Schalter (ausgegraut/semi-transparent) */
.cookie-panel__checkbox--state-inactiv + label .checkbox-toggle {
  background: var(--om-purple) !important; /* Bleibt aktiv-farben, da gecheckt */
  opacity: 0.4; /* Signalisiert dem Nutzer die Inaktivität (Sperrung) */
  filter: grayscale(0.5);
}

/* Verhindert jegliche Klicks oder Hover-Effekte im Browser auf diesen Schalter */
.cookie-panel__checkbox-container--disabled {
  pointer-events: none;
}










.cookie-panel__group-text--clickable {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    width: 100%;
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 16px;
}

.cookie-panel__group-heading-wrapper {
    flex: 1;
}

.cookie-panel__toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f1f5f9;

    margin-top: 2px;
    flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease-in-out;
}

.cookie-panel__toggle-icon::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #475569;
    border-bottom: 2px solid #475569;
    transform: rotate(-45deg);
    transition: transform 0.2s ease-in-out;
    margin-left: -2px;
    margin-top: -1px;
}

.cookie-panel__group-text--clickable[aria-expanded="true"] .cookie-panel__toggle-icon::after {
    transform: rotate(45deg);
    margin-left: 0;
    margin-top: -3px;
}

.cookie-panel__sub-cookies-table-wrapper.cookie-panel__table-hidden {
    display: none;
}












.cookie-panel__links {
  padding-top: 10px;
}
.cookie-panel__link {
  display: inline-block;
  font-size: 12px;
}

.om-cookie-panel__top-section.active .om-cookie-panel__top-buttons .cookie-panel__button--primary,
.om-cookie-panel__top-section.active .om-cookie-panel__top-buttons .cookie-panel__button--secondary {
    display: none;
}
.om-cookie-panel__top-section.active .om-cookie-panel__top-buttons .cookie-panel__button--link {
  background: #000;
  color: #fff;
}
@media (max-width: 768px) {
    .om-cookie-panel__top-section.active .om-cookie-panel__text-block,
    .om-cookie-panel__top-section.active .om-cookie-panel__top-buttons .cookie-panel__button--primary,
    .om-cookie-panel__top-section.active .om-cookie-panel__top-buttons .cookie-panel__button--secondary {
        display: none;
    }
    .om-cookie-panel__bottom-buttons {
        flex-direction: column;
    }
    div.om-cookie-panel {
        padding:16px;
    }
}

@media (max-height: 800px) {
    div.om-cookie-panel {
        padding:20px;
    }
    .om-cookie-panel__top-section {
        gap:10px;
    }
    .om-cookie-panel__text-block {
        padding-right: 10px;
        font-size: 12px;
    }
    .om-cookie-panel .cookie-panel__button {
        padding: 8px 12px;
        border-radius: 10px;
    }
    .om-cookie-panel__bottom-buttons {
        margin-top: 10px;
        padding-top: 10px;
    }
    .om-cookie-panel__tab[data-omcookie-panel-tab="info"] {
        margin-top: 10px;
    }
    .om-cookie-panel__middle-section {
        padding-top:10px;
    }
}




table.cookie-panel__sub-cookies-table {
  margin-block: 0;
  border-width: 0px;
}

/* Kopfzeile */
table.cookie-panel__sub-cookies-table th {
  font-weight: 600;
  padding: 10px 14px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;

  border-right-width:0px;
  border-left-width:0px;
  padding-left:0;
}

table.cookie-panel__sub-cookies-table thead,
table.cookie-panel__sub-cookies-table th {
    background-color: transparent;
}

table.cookie-panel__sub-cookies-table tbody tr {
  &:hover {
    background: none;
  }
}

/* Tabellen-Zellen */
table.cookie-panel__sub-cookies-table td {
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.4;
  font-size: 11px;

  border-right-width:0px;
  border-left-width:0px;
  padding-left:0;
}

table.cookie-panel__sub-cookies-table tr {
    background-color: transparent;
}


