/* ==========================================================
   JS-MODULE: Cookie Banner
   Styling und Layoutlogik für den Cookie-Hinweis
   ========================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.95rem;
}

.cookie-banner a {
  color: #ffee99;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cookie-buttons button {
  background: #fff;
  color: #222;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-buttons button:hover {
  background: #eee;
}

#accept-cookies {
  background-color: #4caf50;
  color: white;
}

#decline-cookies {
  background-color: #f44336;
  color: white;
}

/* Banner nur anzeigen, solange Zustimmung fehlt */
html.cookie-banner-needed .cookie-banner {
  display: block;
}

/* Footer bleibt sichtbar, ohne dass der Banner ihn überdeckt */
html.cookie-banner-needed .page-wrapper {
  padding-bottom: var(--cookie-banner-height, 130px);
}

/* Mobil */
@media (max-width: 600px) {
  html.cookie-banner-needed .page-wrapper {
    padding-bottom: var(--cookie-banner-height, 190px);
  }
}

@media (max-width: 480px) {
  .cookie-banner {
    text-align: center;
    flex-direction: column;
    align-items: center;
  }

  .cookie-banner p {
    flex: unset;
  }

  .cookie-buttons {
    justify-content: center;
  }
}