/**
 * VISIBILIS Cookie-Consent UI (Präfix .cc-)
 * Keine CSS Custom Properties — maximale Browser-/Blocker-Kompatibilität.
 */

.cc-root {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2147483647 !important;
  isolation: isolate;
  pointer-events: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: #0f172a;
  box-sizing: border-box;
  overflow: hidden;
}

.cc-root *,
.cc-root *::before,
.cc-root *::after {
  box-sizing: border-box;
}

.cc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Erstbesuch: Banner-Leiste oben */
.cc-banner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483640;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
  background-color: rgba(15, 23, 42, 0.6);
  pointer-events: auto;
}

.cc-banner__inner {
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  max-height: min(78vh, 32rem);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  background-color: #ffffff;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 900px) {
  .cc-root--banner-top .cc-banner__inner {
    max-width: min(72rem, 100%);
  }
}

/* Erstbesuch zentriert (wie Einstellungs-Dialog, kompakte Karte) */
.cc-root--banner-center .cc-banner {
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.cc-root--banner-center .cc-banner__inner {
  width: min(92vw, 40rem);
  max-width: 100%;
  max-height: min(85vh, 42rem);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
}

.cc-banner__copy {
  text-align: left;
  max-width: 52rem;
}

.cc-banner__brand {
  margin-bottom: 0.85rem;
}

.cc-banner__logo {
  display: block;
  width: auto;
  max-width: min(180px, 55vw);
  height: auto;
  max-height: 28px;
}

.cc-banner__title {
  margin: 0 0 0.45rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cc-banner__text {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
  text-align: left;
  line-height: 1.55;
}

.cc-gpc-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.45;
  color: #166534;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
}

.cc-gpc-notice::before {
  content: "✓";
  flex-shrink: 0;
  font-weight: 700;
}

.cc-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
}

.cc-legal-row {
  font-size: 0.8125rem;
  color: #64748b;
  text-align: left;
  line-height: 1.5;
}

.cc-legal-row--banner {
  margin-top: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.cc-legal-row--modal {
  width: 100%;
  padding-top: 0.65rem;
  margin-top: 0.15rem;
  border-top: 1px solid #e2e8f0;
}

.cc-legal-row__a {
  color: #1a43bf;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-legal-row__a:hover {
  color: #15338f;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cc-btn:focus-visible {
  outline: 2px solid #1a43bf;
  outline-offset: 2px;
}

.cc-btn--primary {
  background-color: #1a43bf;
  color: #ffffff;
  border-color: #1a43bf;
}

.cc-btn--primary:hover {
  background-color: #15338f;
  border-color: #15338f;
}

.cc-btn--ghost {
  background-color: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.cc-btn--ghost:hover {
  background-color: #f8fafc;
}

.cc-btn--link {
  background-color: transparent;
  color: #1a43bf;
  border-color: transparent;
  padding-inline: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: auto;
}

/* Einstellungen: zentriertes Modal-Overlay */
.cc-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483641;
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background-color: rgba(15, 23, 42, 0.6);
  pointer-events: none;
}

.cc-overlay.cc-is-open {
  display: flex !important;
  pointer-events: auto;
  background-color: rgba(15, 23, 42, 0.6);
}

.cc-modal {
  position: relative;
  z-index: 1;
  width: min(92vw, 40rem);
  max-width: 100%;
  max-height: min(85vh, 42rem);
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  overflow: hidden;
}

.cc-modal__header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.cc-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.cc-modal__intro {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.cc-modal__body {
  padding: 0.75rem 1rem 1rem;
  overflow-y: auto;
  flex: 1;
}

.cc-modal__footer {
  padding: 0.75rem 1rem 1.15rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

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

.cc-cat {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background-color: #f8fafc;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.cc-cat__head::-webkit-details-marker {
  display: none;
}

.cc-cat__title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.cc-cat__title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
}

.cc-cat__badge {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.cc-cat__body {
  padding: 0 1rem 0.85rem;
  font-size: 0.8125rem;
  color: #64748b;
  border-top: 1px dashed #e2e8f0;
}

.cc-cat__services {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.cc-switch {
  position: relative;
  width: 3rem;
  height: 1.65rem;
  flex-shrink: 0;
  border: none;
  background-color: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cc-switch:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cc-switch[aria-checked="true"] {
  background-color: #1a43bf;
}

.cc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(1.65rem - 6px);
  height: calc(1.65rem - 6px);
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.cc-switch[aria-checked="true"]::after {
  transform: translateX(calc(3rem - 1.65rem));
}

.cc-reopen {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 2147483642;
  pointer-events: auto;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #64748b;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.cc-root.cc-banner-hidden .cc-banner,
.cc-root.cc-modal-open .cc-banner {
  display: none !important;
}

html.cc-consent-scroll-lock,
html.cc-consent-scroll-lock body {
  overflow: hidden !important;
}
