/* ==========================================================================
   Cookie Consent Banner – CSS
   DSGVO + TDDDG konform, kein Dark Pattern
   ========================================================================== */

/* ---------- Overlay ---------- */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.35s ease;
}

.cc-overlay.cc-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Banner ---------- */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #fff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  transition: transform 0.4s ease, opacity 0.35s ease;
  max-height: 100vh;
  overflow-y: auto;
}

.cc-banner.cc-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Inner container ---------- */
.cc-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 24px 24px;
}

/* ---------- Text ---------- */
.cc-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.cc-description {
  margin: 0 0 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* ---------- Kategorien ---------- */
.cc-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.cc-category {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
  padding-left: 44px;
}

.cc-category:hover {
  border-color: #999;
  background-color: #fafafa;
}

.cc-category input[type="checkbox"] {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

.cc-category input[type="checkbox"]:disabled {
  cursor: default;
  opacity: 0.6;
}

.cc-cat-name {
  font-weight: 600;
  font-size: 14px;
  color: #222;
}

.cc-cat-desc {
  font-size: 12px;
  color: #777;
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.cc-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cc-btn {
  flex: 1 1 0;
  min-width: 160px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
  line-height: 1.3;
}

/* Ablehnen – gleich gross wie Akzeptieren */
.cc-btn--reject {
  background: #fff;
  color: #333;
  border-color: #ccc;
}

.cc-btn--reject:hover {
  background: #f3f3f3;
  border-color: #999;
}

/* Auswahl speichern */
.cc-btn--settings {
  background: #fff;
  color: #333;
  border-color: #ccc;
}

.cc-btn--settings:hover {
  background: #f3f3f3;
  border-color: #999;
}

/* Alle akzeptieren – gleich gross */
.cc-btn--accept {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.cc-btn--accept:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* ---------- Focus-States (Barrierefreiheit) ---------- */
.cc-btn:focus-visible,
.cc-category input:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .cc-inner {
    padding: 20px 16px 18px;
  }

  .cc-title {
    font-size: 18px;
  }

  .cc-description {
    font-size: 13px;
  }

  .cc-categories {
    flex-direction: column;
    gap: 8px;
  }

  .cc-category {
    flex: 1 1 auto;
  }

  .cc-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .cc-btn {
    min-width: unset;
    width: 100%;
  }
}
