/* === DYWC Modernisiertes Design für Cookie Banner (mit Variablen) === */

/* Default-Werte (können durch Theme oder JS überschrieben werden) */
:root {
  /* Grundfarben */
  --dywc-primary: var(--e-global-color-primary, #00497E);
  --dywc-secondary: #5B8F1E;
  --dywc-bg: #ffffff;
  --dywc-text: #333333;
  --dywc-border: #e0e0e0;
  --dywc-group-bg: #f9f9f9;
  --dywc-link: #1a73e8;

  /* Buttons */
  --dywc-btn-accept-all-bg: #5B8F1E;
  --dywc-btn-accept-all-bg-hover: #76B82A;
  --dywc-btn-save-bg: #00497E;
  --dywc-btn-save-bg-hover: #125aa0;
  --dywc-btn-essential-bg: #e0e0e0;
  --dywc-btn-essential-bg-hover: #cacaca;

  /* Scrollbar / Akzente */
  --dywc-accent: #007CBA;
	
	--dywc-title-font: 20px;
    --dywc-text-font: 14px;

    --dywc-save-bg: #007CBA;
    --dywc-save-text: #ffffff;

    --dywc-essential-bg: #e0e0e0;
    --dywc-essential-text: #333333;
}

/* Hauptcontainer */
.dywc {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 100%;
  max-width: 420px;
  background: var(--dywc-bg);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  z-index: 9999;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  color: var(--dywc-text);
  animation: dywc-fadein 0.3s ease-in-out;
  border: 1px solid var(--dywc-border);
}

@keyframes dywc-fadein {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.dywc-inner {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.dywc-sec {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #efefef;
  padding-bottom: 10px;
}

.dywc-logo {
  max-width: 100px;
  margin-right: 15px;
  width: 10%;
}

.dywc h2 {
  font-size: var(--dywc-title-font);
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--dywc-primary);
}

.dywc p {
  font-size: var(--dywc-text-font);
  line-height: 1.5;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--dywc-text);
}

/* Gruppenbereich */
.dywc-groups {
  /* margin-bottom: 1.5rem; */
  overflow-y: auto;
  max-height: 250px;
}

.dywc-group {
  border: 1px solid #ddd;
  border-radius: 12px;
  background: var(--dywc-group-bg);
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.dywc-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--dywc-text);
}

.dywc-group input[type="checkbox"] {
  transform: scale(1.3);
  accent-color: var(--dywc-accent);
  margin-right: 1rem;
}

.dywc-group p {
  margin: 0.5rem 0 0 0;
  font-size: 0.85rem;
  color: #555;
}

/* Details in Gruppen */
.dywc-group-details {
  max-height: 0;
  overflow-y: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  margin-top: 0;
  border-radius: 4px;
}

.dywc-group-details.open {
  max-height: 400px;
}

.dywc-cookie {
  font-size: 0.85rem;
  margin: 0.5rem 0;
  border-top: 1px solid #efefef;
  padding-top: 0.5rem;
}

/* Info-Link */
.dywc-toggle-details {
  font-size: 0.8rem;
  color: var(--dywc-accent);
  cursor: pointer;
  margin-left: auto;
  text-decoration: underline;
}

.dywc-toggle-details.open i {
  transform: translate(0, -12%) rotate(180deg);
}

/* Buttons / Aktionen */
.dywc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.dywc-actions button {
  flex: 1 1 45%;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Alle akzeptieren = „Primärbutton“ */
#dywc-accept-all {
  background-color: var(--dywc-btn-accept-all-bg);
  color: #fff;
}

#dywc-accept-all:hover {
  background-color: var(--dywc-btn-accept-all-bg-hover);
}

/* Speichern */
#dywc-save {
  background: var(--dywc-save-bg);
   color: var(--dywc-save-text);
}

#dywc-save:hover {
  background-color: var(--dywc-btn-save-bg-hover);
}

/* Nur essenziell */
#dywc-accept-essential {
  background: var(--dywc-essential-bg);
    color: var(--dywc-essential-text);
  flex: 1 1 100%;
}

#dywc-accept-essential:hover {
  background-color: var(--dywc-btn-essential-bg-hover);
}

/* Links (Datenschutz / Impressum) */
.dywc-actions .dywc-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.dywc-actions .dywc-links a {
  text-decoration: underline;
  color: var(--dywc-link);
  white-space: nowrap;
}

/* Background-Layer */
.dywc-bglayer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}

/* Scrollbar-Styling */
.dywc-groups::-webkit-scrollbar {
  width: 4px;
}

.dywc-groups::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.dywc-groups::-webkit-scrollbar-thumb {
  background: var(--dywc-accent);
  border-radius: 4px;
}
/*
#cookie-reset-btn {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
}

#cookie-reset-btn img {
  width: 28px;
  height: 28px;
  filter: brightness(0) saturate(100%) invert(54%) sepia(41%) saturate(754%) hue-rotate(63deg) brightness(92%) contrast(85%);
  transition: filter 0.3s ease;
}

#cookie-reset-btn:hover img {
  filter: brightness(0) saturate(100%) invert(41%) sepia(90%) saturate(453%) hue-rotate(56deg) brightness(100%) contrast(100%);
}
*/

/* Mobile */
@media (max-width: 480px) {
  .dywc {
    right: 0rem;
    left: 0rem;
    margin: 20px;
    bottom: 1rem;
    max-width: 90%;
  }
  .dywc-inner {
    padding: 1.5rem;
  }
}
