:root{
  --ak-accent: #22c55e;      /* helleres Grün */
  --ak-accent-hover:#16a34a;
  --ak-grey:#e5e7eb;
  --ak-grey-hover:#d1d5db;
  --ak-text-dark:#111827;
  --ak-modal-bg:#1f2937;    /* dunkles Blau/Grau */
  --ak-modal-border: rgba(255,255,255,0.08);
  --ak-overlay: rgba(0,0,0,0.55);
  --ak-settings:#9ca3af;        /* grau (z.B. Tailwind gray-400) */
  --ak-settings-hover:#6b7280;  /* dunkler (gray-500/600) */

}

/* overlay + modal */
#ak-cookie-overlay{
  position: fixed;
  inset: 0;
  background: var(--ak-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

#ak-cookie-overlay.ak-open{
  display: flex;            /* <-- neu */
}

#ak-cookie-modal{
  width: min(450px, 100%);
  background: var(--ak-modal-bg);
  border: 1px solid var(--ak-modal-border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  color: white;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

#ak-cookie-modal .ak-body{ padding: 22px 24px 18px; }
#ak-cookie-modal h2{
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
}
#ak-cookie-modal p{
  margin: 0 0 14px;
  color: rgba(255,255,255,0.82);
  font-size: 14.5px;
  line-height: 1.5;
}

#ak-cookie-modal a{
  color: rgba(255,255,255,0.92);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ak-actions{
  display: grid;
  gap: 12px;
  margin-top: 18px; /* etwas tiefer */
}

#ak-cookie-modal .ak-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
}

#ak-cookie-modal .ak-row button[data-ak="reject-all"]{
  margin-left: auto; /* rechtsbündig */
  background: var(--ak-grey);
  color: var(--ak-text-dark);
  border: 1px solid rgba(255,255,255,0.55);
  padding: 12px 18px; /* wie Primary */
}
#ak-cookie-modal .ak-row button[data-ak="reject-all"]:hover{
  background: var(--ak-grey-hover);
}

.ak-btn{
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .05s ease, background-color .15s ease, opacity .15s ease;
  font-size: 14px;
  min-width: 170px;
}
.ak-btn:active{ transform: scale(0.99); }

.ak-btn-primary{
  background: var(--ak-accent);
  color: white;
  border: 1px solid transparent;
}
.ak-btn-primary:hover{ background: var(--ak-accent-hover); }

.ak-btn-ghost{
  background: transparent;
  color: rgba(255,255,255,0.9);
  padding-left: 10px;
  padding-right: 10px;
}
.ak-btn-ghost:hover{ opacity: .9; }

.ak-btn-secondary{
  background: var(--ak-grey);
  color: var(--ak-text-dark);
}
.ak-btn-secondary:hover{ background: var(--ak-grey-hover); }

.ak-btn-wide{
  width: 100%;
  border-radius: 999px;
  padding: 13px 18px;
}

#ak-cookie-modal button[data-ak="settings"]{
  background: var(--ak-settings) !important;
  color: #111827 !important; /* schwarz */
  border: 1px solid rgba(255,255,255,0.25) !important;
}
#ak-cookie-modal button[data-ak="settings"]:hover{
  background: var(--ak-settings-hover) !important;
}

.ak-head{
  display:flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 0;
}
.ak-back{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  cursor:pointer;
}
.ak-back:hover{ background: rgba(255,255,255,0.14); }

/* preference rows */
.ak-pref{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ak-pref:first-of-type{ border-top: 0; }

.ak-pref h3{
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.ak-pref p{
  margin: 6px 0 0;
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
}


/* responsive: on very small screens */
@media (max-width: 420px){
  #ak-cookie-modal h2{ font-size: 22px; }
  .ak-btn{ width: 100%; }
  #ak-cookie-modal .ak-row{ flex-direction: column; }
}

/* Fallback: trifft den großen Button mit Text "Einstellungen" */
#ak-cookie-modal button.ak-btn-wide{
  background: var(--ak-settings, #9ca3af) !important;
  color: #111827 !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
}
#ak-cookie-modal button.ak-btn-wide:hover{
  background: var(--ak-settings-hover, #6b7280) !important;
}

/* Switch: Knopf nach rechts, wenn "an" – egal ob data-on, aria-checked oder data-state */
.ak-switch[data-on="true"]::after,
.ak-switch[aria-checked="true"]::after,
.ak-switch[data-state="checked"]::after{
  transform: translateX(18px);
}

/* Switch: grün, wenn "an" */
.ak-switch[data-on="true"],
.ak-switch[aria-checked="true"],
.ak-switch[data-state="checked"]{
  background: var(--ak-accent);
  border-color: rgba(0,0,0,0.12);
}

/* Typisches Switch-Markup: label.ak-switch input + span */
#ak-cookie-modal .ak-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* versteckt die echte Checkbox (aber bleibt klickbar) */
#ak-cookie-modal .ak-switch input{
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

/* Track */
#ak-cookie-modal .ak-switch span{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
  transition: background-color .18s ease;
}

/* Thumb */
#ak-cookie-modal .ak-switch span::after{
  content:"";
  position:absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transition: transform .18s ease;
}

/* ON */
#ak-cookie-modal .ak-switch input:checked + span{
  background: var(--ak-accent);
  border-color: rgba(0,0,0,0.12);
}
#ak-cookie-modal .ak-switch input:checked + span::after{
  transform: translateX(18px);
}

