/* Cookie consent banner (GDPR / TTDSG compliant CMP) */
.crmgo-consent[hidden] {
  display: none !important;
}

.crmgo-consent:not([hidden]) {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10000;
  padding: 1rem;
  background: rgba(15, 28, 42, 0.96);
  color: #f2f5f8;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
}

.crmgo-consent-inner {
  width: min(920px, 100%);
  margin: 0 auto;
}

.crmgo-consent h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.crmgo-consent-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.92;
}

.crmgo-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.crmgo-consent-btn {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.crmgo-consent-btn--primary {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

.crmgo-consent-links {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.crmgo-consent-links a {
  color: #90caf9;
}

.crmgo-consent-modal[hidden] {
  display: none !important;
}

.crmgo-consent-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
}

.crmgo-consent-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--bg, #fff);
  color: var(--text, #0f1c2a);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.crmgo-consent-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.crmgo-consent-modal-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.crmgo-consent-modal-close-x {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.crmgo-consent-modal-close-x:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.crmgo-consent-categories {
  list-style: none;
  margin: 0.75rem 0 1.25rem;
  padding: 0;
}

.crmgo-consent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.crmgo-consent-row-text {
  flex: 1;
  min-width: 0;
}

.crmgo-consent-row-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.crmgo-consent-row-text p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.75;
}

.crmgo-consent-always {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.55;
  white-space: nowrap;
}

.crmgo-consent-toggle {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

.crmgo-consent-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.crmgo-consent-toggle-ui {
  position: absolute;
  inset: 0;
  background: #c5ccd6;
  border-radius: 999px;
  transition: background 0.2s;
}

.crmgo-consent-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.crmgo-consent-toggle input:checked + .crmgo-consent-toggle-ui {
  background: #1565c0;
}

.crmgo-consent-toggle input:checked + .crmgo-consent-toggle-ui::after {
  transform: translateX(18px);
}

.crmgo-consent-toggle input:focus-visible + .crmgo-consent-toggle-ui {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
}

.crmgo-consent-modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.crmgo-consent-modal-actions .crmgo-consent-btn {
  color: var(--text, #0f1c2a);
  border-color: rgba(0, 0, 0, 0.2);
  background: #fff;
}

.crmgo-consent-modal-actions .crmgo-consent-btn--primary {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

.crmgo-consent-btn--ghost {
  background: transparent;
}

body.crmgo-consent-open {
  overflow: hidden;
}

/* Reserve space so fixed banner does not cover page footer / legal content */
body.crmgo-consent-banner-visible {
  scroll-padding-bottom: var(--crmgo-consent-banner-offset, 11rem);
}

body.crmgo-consent-banner-visible .shell,
body.crmgo-consent-banner-visible .legal-shell,
body.crmgo-consent-banner-visible.landing-page,
body.crmgo-consent-banner-visible.landing-consulting {
  padding-bottom: calc(var(--crmgo-consent-banner-offset, 11rem) + 1.25rem);
}

body.crmgo-consent-banner-visible .legal-footer,
body.crmgo-consent-banner-visible .crmgo-footer .legal-footer,
body.crmgo-consent-banner-visible .lp-footer .legal-footer,
body.crmgo-consent-banner-visible .ic-footer .legal-footer {
  margin-bottom: 0.5rem;
}

.legal-form-notice {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted, #5a6570);
  line-height: 1.45;
}

.legal-form-notice a {
  color: var(--accent, #1565c0);
}

/* Legal footer links */
.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  padding: 1rem 0 1.5rem;
  font-size: 0.82rem;
}

.legal-footer a,
.legal-footer-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.legal-footer-sep {
  opacity: 0.35;
  user-select: none;
}

.lp-footer .legal-footer,
.ic-footer .legal-footer {
  width: 100%;
  margin-top: 0.5rem;
}

.crmgo-footer .legal-footer {
  margin-top: 0.75rem;
}

/* Legal pages */
.legal-shell {
  min-height: 100vh;
}

.legal-main {
  width: min(760px, 100% - 2rem);
  margin: 2rem auto 3rem;
}

.legal-article h1 {
  margin-bottom: 1.5rem;
}

.legal-body h2,
.legal-intro h2 {
  margin-top: 1.75rem;
  font-size: 1.15rem;
}

.legal-impressum {
  margin: 1.5rem 0;
}

.legal-impressum dt {
  font-weight: 600;
  margin-top: 1rem;
}

.legal-impressum dd {
  margin: 0.25rem 0 0;
}

.legal-note {
  font-size: 0.85rem;
  opacity: 0.8;
}

.legal-topbar {
  justify-content: space-between;
}

[data-theme="dark"] .crmgo-consent-modal-panel {
  background: #1a2332;
  color: #e8edf4;
}

[data-theme="dark"] .crmgo-consent-modal-actions .crmgo-consent-btn {
  color: #e8edf4;
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
}

[data-theme="dark"] .crmgo-consent-row {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
