/* ==========================================================================
   Consent-Banner & Präferenz-Dialog (Optik nach Borlabs-Banner der Referenz:
   Leiste unten, weiße Box, blaue Buttons #2563eb, Roboto 12.25px / #555)
   ========================================================================== */

.cc-bar[hidden], .cc-modal[hidden], .cc-widget[hidden] { display: none !important; }

.cc-bar {
  position: fixed;
  left: 8px; right: 8px; bottom: 0;
  z-index: 9998;
  padding: 24px 24px 8px;
  pointer-events: none;
}
.cc-bar__inner {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 326px;
  gap: 24px;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 40px 24px 24px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
  color: #555;
  font: 400 12.25px/1.43 var(--font-body);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.cc-bar__logo img { width: 48px; height: 48px; }
.cc-bar__text p { margin: 0 0 8px; }
.cc-bar__text p:last-of-type { margin-bottom: 0; }
.cc-bar__headline { font-weight: 700; font-size: 14px; color: #222; }
.cc-bar__text a, .cc-modal a { color: #2563eb; text-decoration: underline; }
.cc-bar__groups { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 10px 0 0; padding: 0; }
.cc-bar__groups label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.cc-bar__groups input { width: 16px; height: 16px; margin: 0; accent-color: #2563eb; }
.cc-bar__actions { display: flex; flex-direction: column; gap: 8px; }

.cc-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 12px 20px;
  background: #2563eb;
  color: #fff;
  font: 600 14px/1.5 var(--font-body);
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease;
}
.cc-btn:hover, .cc-btn:focus-visible { background: #1d4ed8; }
.cc-btn:focus-visible, .cc-bar__close:focus-visible, .cc-modal__close:focus-visible, .cc-widget:focus-visible {
  outline: 2px solid #1d4ed8; outline-offset: 2px;
}

.cc-bar__close, .cc-modal__close {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
}
.cc-bar__close svg, .cc-modal__close svg { width: 16px; height: 16px; }

/* Präferenz-Dialog */
.cc-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .6);
}
.cc-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
  color: #555;
  font: 400 14px/1.5 var(--font-body);
}
.cc-modal__dialog:focus { outline: none; }
.cc-modal__head { padding: 24px 56px 0 24px; }
.cc-modal__title { font: 700 20px/1.3 var(--font-body); color: #222; }
.cc-modal__body { padding: 8px 24px 0; }
.cc-modal__body > p { margin: 8px 0 16px; }
.cc-cat { border: 1px solid #e5e5e5; border-radius: 4px; padding: 14px 16px; margin-bottom: 12px; }
.cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cc-cat h3 { font: 700 16px/1.3 var(--font-body); color: #222; }
.cc-cat p { margin: 8px 0; }
.cc-cat details { font-size: 13px; }
.cc-cat summary { cursor: pointer; color: #2563eb; }
.cc-cat dl { margin: 8px 0 0; }
.cc-cat dt { font-weight: 700; color: #333; margin-top: 8px; }
.cc-cat dd { margin: 2px 0 0; }
.cc-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 24px 8px; }
.cc-modal__actions .cc-btn { flex: 1 1 200px; width: auto; }
.cc-modal__links { padding: 0 24px 20px; margin: 4px 0 0; font-size: 12px; text-align: center; }

/* Schalter */
.cc-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.cc-switch__track {
  width: 44px; height: 24px;
  border-radius: 12px;
  background: #bdc1c8;
  position: relative;
  transition: background-color .2s ease;
}
.cc-switch__track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}
.cc-switch input:checked + .cc-switch__track { background: #2563eb; }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(20px); }
.cc-switch input:disabled + .cc-switch__track { opacity: .55; cursor: not-allowed; }
.cc-switch input:focus-visible + .cc-switch__track { outline: 2px solid #1d4ed8; outline-offset: 2px; }

/* Widget zum erneuten Öffnen (unten links, wie Borlabs-Widget der Referenz) */
.cc-widget {
  position: fixed;
  left: 20px; bottom: 20px;
  z-index: 9990;
  width: 56px; height: 56px;
  padding: 12px;
  border: 0;
  border-radius: 28px;
  background: rgba(250, 250, 250, .85);
  color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  cursor: pointer;
}
.cc-widget svg { width: 32px; height: 32px; }
.cc-widget:hover { color: var(--color-primary, #80732a); }

@media (max-width: 900px) {
  .cc-bar { left: 0; right: 0; padding: 8px; }
  .cc-bar__inner { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 20px 16px; max-height: 85vh; }
  .cc-bar__logo { display: none; }
  .cc-bar__text { padding-right: 24px; }
}
@media (max-width: 640px) {
  .cc-widget { left: 12px; bottom: 12px; width: 48px; height: 48px; padding: 10px; }
  .cc-widget svg { width: 28px; height: 28px; }
}
