/* Modern cookie banner + consent modal */

:root {
  --cc-bg: #ffffff;
  --cc-fg: #1f2937;
  --cc-muted: #6b7280;
  --cc-primary: #295c3b;
  --cc-primary-hover: #1f4a2d;
  --cc-secondary: #e7e1d1;
  --cc-border: #e5e7eb;
  --cc-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.cc-hidden { display: none !important; }

/* ---- Bottom banner ---- */
.cc-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 9000;
  max-width: 720px;
  margin: 0 auto;
  background: var(--cc-bg);
  color: var(--cc-fg);
  border-radius: 12px;
  box-shadow: var(--cc-shadow);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cc-banner__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cc-primary);
}

.cc-banner__text {
  margin: 0 0 1rem;
  color: var(--cc-muted);
}

.cc-banner__text a {
  color: var(--cc-primary);
  text-decoration: underline;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cc-btn {
  appearance: none;
  border: 1px solid var(--cc-primary);
  background: var(--cc-bg);
  color: var(--cc-primary);
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cc-btn:hover { background: rgba(41, 92, 59, 0.08); }

.cc-btn--primary {
  background: var(--cc-primary);
  color: #fff;
}
.cc-btn--primary:hover { background: var(--cc-primary-hover); }

/* Akzeptieren und Ablehnen müssen optisch gleichwertig sein (EuGH C-673/17) */
.cc-btn--equal {
  background: var(--cc-primary);
  color: #fff;
  border-color: var(--cc-primary);
  min-width: 140px;
}
.cc-btn--equal:hover { background: var(--cc-primary-hover); }

.cc-btn--ghost {
  border-color: var(--cc-border);
  color: var(--cc-muted);
}
.cc-btn--ghost:hover { background: #f9fafb; }

/* Service-Detail-Liste im Modal */
.cc-category__details {
  margin: 0.75rem 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.85rem;
  color: var(--cc-muted);
}
.cc-category__details dt {
  font-weight: 600;
  color: var(--cc-fg);
}
.cc-category__details dd { margin: 0; }

.cc-category--locked { background: #f9fafb; }

.cc-embed-placeholder__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* ---- Settings modal ---- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
}

.cc-modal__dialog {
  background: var(--cc-bg);
  color: var(--cc-fg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  box-shadow: var(--cc-shadow);
  padding: 1.75rem 1.75rem 1.5rem;
}

.cc-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  color: var(--cc-primary);
}

.cc-modal__intro {
  color: var(--cc-muted);
  margin: 0 0 1.25rem;
}

.cc-category {
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.cc-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cc-category__name {
  font-weight: 600;
  margin: 0;
  padding: 0;
  background: none;
  color: var(--cc-fg);
  font-size: 1.05rem;
  width: auto;
}

.cc-category__desc {
  margin: 0.5rem 0 0;
  color: var(--cc-muted);
  font-size: 0.9rem;
}

/* Toggle switch */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
}
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-switch__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}
.cc-switch__slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.cc-switch input:checked + .cc-switch__slider { background: var(--cc-primary); }
.cc-switch input:checked + .cc-switch__slider::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-switch__slider { opacity: 0.7; cursor: not-allowed; }

.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

/* ---- Embed placeholders (for blocked content) ---- */
.cc-embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 220px;
  padding: 1.5rem;
  background: var(--cc-secondary);
  border: 1px dashed #b6a474;
  border-radius: 10px;
  color: var(--cc-fg);
  text-align: center;
}

.cc-embed-placeholder p {
  margin: 0;
  max-width: 38ch;
  color: var(--cc-muted);
}

@media (max-width: 540px) {
  .cc-banner { padding: 1rem; }
  .cc-banner__actions { justify-content: stretch; }
  .cc-banner__actions .cc-btn { flex: 1 1 auto; }
}
