/* Klaro! — Brand-CSS für Baumpflege Schlupek
   Notice + Modal beide bottom-left, kompakt, Forest Green */

:root {
  --bps-green: #074734;
  --bps-mint: #F3F6F4;
  --bps-amber: #FCA311;
  --bps-text: #1a1a1a;
  --bps-text-light: #4E4E4E;
  --bps-white: #ffffff;
  --bps-border: #e5e7eb;
  --bps-border-soft: #ecefed;
}

#klaro {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--bps-text);
  position: relative;
  z-index: 2147483646;
}

#klaro .klaro {
  font-family: inherit;
  font-size: 14px;
}

/* === Notice — Desktop: Full-Width Bottom-Bar | Mobile: zentrierte Card === */
#klaro .cookie-notice:not(.cookie-modal-notice) {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: none;
  background: var(--bps-white);
  color: var(--bps-text);
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--bps-border);
  box-shadow: 0 -8px 32px rgba(7, 71, 52, 0.10), 0 -2px 8px rgba(0, 0, 0, 0.06);
  z-index: 2147483646;
  padding: 22px 32px 20px;
}

@media (max-width: 768px) {
  #klaro .cookie-notice:not(.cookie-modal-notice) {
    bottom: 12px;
    left: 12px;
    right: 12px;
    border-radius: 16px;
    border: 1px solid var(--bps-border);
    border-top: 1px solid var(--bps-border);
    box-shadow: 0 16px 48px rgba(7, 71, 52, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px 22px 18px;
  }
}

/* cn-body: Desktop = Grid (Text links, Buttons rechts) | Mobile = vertikaler Stack */
#klaro .cookie-notice .cn-body {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title   actions"
    "desc    actions";
  column-gap: 32px;
  row-gap: 6px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  #klaro .cookie-notice .cn-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
}

/* Title */
#klaro .cookie-notice .cn-body h2,
#klaro .cookie-notice .cn-body .title,
#klaro .cookie-notice #id-cookie-title {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bps-green);
  margin: 0;
  line-height: 1.3;
  grid-area: title;
  order: 1;
}

/* Beschreibung */
#klaro .cookie-notice .cn-body p,
#klaro .cookie-notice .cn-body .description {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bps-text-light);
  margin: 0;
  grid-area: desc;
  order: 2;
}

/* Headline in Forest Green direkt über dem Description-Text */
#klaro .cookie-notice .cn-headline {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--bps-green);
  margin: 0 0 6px 0;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

/* Description-Body: separater Span, damit cn-learn-more nicht von "p a"-Styles erwischt wird */
#klaro .cookie-notice .cn-body .cn-text {
  display: block;
  color: var(--bps-text-light);
}

/* Inline-Links nur innerhalb des Description-Textes (nicht für Buttons!) */
#klaro .cookie-notice .cn-text a {
  color: var(--bps-green);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

#klaro .cookie-notice .cn-text a:hover {
  border-bottom-color: var(--bps-green);
}

/* Legal-Links unten-links (Datenschutz · Impressum) — als Block am Ende der Description */
#klaro .cookie-notice .cn-legal-links {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--bps-text-light);
  margin-top: 8px;
}

#klaro .cookie-notice .cn-legal-links a,
#klaro .cookie-notice .cn-legal-links a:hover,
#klaro .cookie-notice .cn-legal-links a:focus,
#klaro .cookie-notice .cn-legal-links a:active {
  color: var(--bps-green);
  font-weight: 600;
  font-size: 11px;
  text-decoration: none;
  border-bottom: 0;
  opacity: 1;
}

@media (max-width: 768px) {
  #klaro .cookie-notice .cn-legal-links {
    margin-top: 6px;
  }
}

/* Action-Block: Desktop = horizontale Reihe rechts | Mobile = vertikaler Stack */
#klaro .cookie-notice .cn-ok,
#klaro .cookie-notice .cn-buttons {
  display: flex !important;
  flex-direction: row;
  gap: 10px;
  margin: 0 !important;
  grid-area: actions;
  align-items: center;
  flex-wrap: nowrap;
  order: 3;
}

@media (max-width: 768px) {
  #klaro .cookie-notice .cn-ok,
  #klaro .cookie-notice .cn-buttons {
    flex-direction: column;
    width: 100%;
    margin: 6px 0 0 0 !important;
  }
}

/* Reihenfolge im cn-ok: Desktop = Ablehnen, Akzeptieren | Mobile = Akzeptieren oben */
#klaro .cookie-notice .cn-ok .cm-btn-accept-all,
#klaro .cookie-notice .cn-ok .cm-btn-success {
  order: 2;
}
#klaro .cookie-notice .cn-ok .cm-btn-decline,
#klaro .cookie-notice .cn-ok .cn-decline {
  order: 1;
}

@media (max-width: 768px) {
  #klaro .cookie-notice .cn-ok .cm-btn-accept-all,
  #klaro .cookie-notice .cn-ok .cm-btn-success { order: 1; }
  #klaro .cookie-notice .cn-ok .cm-btn-decline,
  #klaro .cookie-notice .cn-ok .cn-decline { order: 2; }
}

/* Buttons: Desktop = auto-width, Mobile = full-width */
#klaro .cookie-notice .cn-ok .cm-btn,
#klaro .cookie-notice .cn-buttons .cm-btn,
#klaro .cookie-notice button.cm-btn {
  width: auto;
  min-width: 140px;
  padding: 13px 24px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin: 0 !important;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #klaro .cookie-notice .cn-ok .cm-btn,
  #klaro .cookie-notice .cn-buttons .cm-btn,
  #klaro .cookie-notice button.cm-btn {
    width: 100%;
    min-width: 0;
  }
}

#klaro .cookie-notice .cn-ok .cm-btn:hover,
#klaro .cookie-notice .cn-buttons .cm-btn:hover {
  transform: scale(1.06);
}

/* Primary: Alle akzeptieren — Forest Green */
#klaro .cookie-notice .cm-btn-accept-all,
#klaro .cookie-notice .cm-btn-success {
  background: var(--bps-green) !important;
  color: var(--bps-white) !important;
  border: 0 !important;
}

/* Secondary: Ablehnen — Mint, kein Border */
#klaro .cookie-notice .cm-btn-decline,
#klaro .cookie-notice .cn-decline {
  background: var(--bps-mint) !important;
  color: var(--bps-green) !important;
  border: 0 !important;
}

/* "Mehr" / Einstellungen — Desktop: auto-width links neben den anderen, Mobile: full-width 3. im Stack */
#klaro .cookie-notice .cn-learn-more,
#klaro .cookie-notice .cm-btn-learn-more,
#klaro .cookie-notice button.cn-learn-more {
  width: auto;
  min-width: 140px;
  padding: 13px 24px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 999px;
  background: var(--bps-mint);
  color: var(--bps-green);
  border: 0;
  cursor: pointer;
  transition: transform .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  margin: 0 !important;
  order: 0;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: none;
}

#klaro .cookie-notice .cn-learn-more:focus,
#klaro .cookie-notice .cn-learn-more:focus-visible,
#klaro .cookie-notice .cn-learn-more:active,
#klaro .cookie-notice .cn-learn-more:hover {
  box-shadow: none !important;
  outline: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  text-decoration: none !important;
  background: var(--bps-mint) !important;
  color: var(--bps-green) !important;
  font-weight: 600 !important;
}

@media (max-width: 768px) {
  #klaro .cookie-notice .cn-learn-more,
  #klaro .cookie-notice .cm-btn-learn-more,
  #klaro .cookie-notice button.cn-learn-more {
    width: 100%;
    min-width: 0;
    order: 4;
  }
}

#klaro .cookie-notice .cn-learn-more:hover {
  transform: scale(1.06);
}

/* "Realized with Klaro" Branding ausblenden */
#klaro .cn-powered-by,
#klaro .cookie-notice .cn-powered-by {
  display: none !important;
}

/* === Buttons (global, gilt v.a. für Modal) === */
#klaro .cm-btn,
#klaro .cn-buttons button,
#klaro button.cm-btn {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#klaro .cm-btn:hover,
#klaro .cn-buttons button:hover {
  transform: scale(1.05);
  box-shadow: none;
}

#klaro .cm-btn:focus,
#klaro .cm-btn:focus-visible,
#klaro .cm-btn:active,
#klaro .cn-buttons button:focus,
#klaro .cn-buttons button:active,
#klaro button.cm-btn:focus,
#klaro button.cm-btn:active {
  box-shadow: none !important;
  outline: none;
}

/* Primary: "Alle akzeptieren" */
#klaro .cm-btn-success,
#klaro .cn-buttons .cm-btn-accept-all,
#klaro .cm-btn-accept-all {
  background: var(--bps-green);
  color: var(--bps-white);
  border: 0;
}

/* Secondary: "Auswahl speichern" */
#klaro .cm-btn-info,
#klaro .cm-btn-accept,
#klaro .cn-buttons .cm-btn-accept {
  background: var(--bps-mint);
  color: var(--bps-green);
  border: 0;
}

/* Decline: "Ablehnen" */
#klaro .cm-btn-decline,
#klaro .cn-decline,
#klaro .cn-buttons .cn-decline,
#klaro .cm-btn-danger {
  background: var(--bps-mint);
  color: var(--bps-green);
  border: 0;
}

#klaro .cn-learn-more,
#klaro .cm-btn-learn-more {
  background: var(--bps-mint);
  color: var(--bps-green);
  border: 0;
  text-decoration: none;
}

/* === Modal — bottom-left Card, intern scrollbar, Footer fix === */
#klaro .cookie-modal {
  font-family: 'Poppins', sans-serif;
  position: fixed;
  bottom: 16px;
  left: 16px;
  top: 16px;
  z-index: 2147483647;
  width: 100%;
  max-width: 480px;
  pointer-events: none;
  display: flex;
  align-items: stretch;
}

#klaro .cookie-modal .cm-bg {
  display: none;
}

#klaro .cookie-modal .cm-modal {
  background: var(--bps-white);
  color: var(--bps-text);
  border-radius: 16px;
  width: 100%;
  max-height: 100%;
  box-shadow: 0 12px 40px rgba(7, 71, 52, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--bps-border);
  position: relative;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: auto;
}

@media (max-width: 540px) {
  #klaro .cookie-modal {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: 12px;
    max-width: none;
    width: auto;
  }
}

/* Header */
#klaro .cookie-modal .cm-modal .cm-header {
  border-bottom: 1px solid var(--bps-border-soft);
  padding: 22px 24px 16px;
  position: relative;
}

#klaro .cookie-modal .cm-modal .cm-header h1,
#klaro .cookie-modal .cm-modal .cm-header h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--bps-green);
  margin: 0 0 6px 0;
  line-height: 1.3;
  padding-right: 32px; /* Platz für X-Button */
}

#klaro .cookie-modal .cm-modal .cm-header p {
  font-size: 13px;
  color: var(--bps-text-light);
  line-height: 1.55;
  margin: 0;
}

#klaro .cookie-modal .cm-modal .cm-header p a,
#klaro .cookie-modal .cm-modal a {
  color: var(--bps-green);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

#klaro .cookie-modal .cm-modal .cm-header p a:hover,
#klaro .cookie-modal .cm-modal a:hover {
  border-bottom-color: var(--bps-green);
}

/* Close X-Button — Klaro rendert nur einen leeren Button, wir füllen ihn via CSS */
#klaro .cookie-modal .cm-modal .cm-header .hide,
#klaro .cookie-modal .cm-modal .cm-header button.cm-btn-close,
#klaro .cookie-modal .cm-modal .hide {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bps-text-light);
  transition: background 0.2s ease;
}

#klaro .cookie-modal .cm-modal .hide:hover {
  background: var(--bps-mint);
  color: var(--bps-green);
}

/* X-Icon via SVG-Background, falls Klaro das Element leer rendert */
#klaro .cookie-modal .cm-modal .hide::before,
#klaro .cookie-modal .cm-modal .hide svg {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234E4E4E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}

#klaro .cookie-modal .cm-modal .hide svg {
  display: none; /* falls Klaro selbst ein leeres svg rendert, ausblenden — wir nutzen ::before */
}

/* Body */
#klaro .cookie-modal .cm-modal .cm-body {
  padding: 16px 24px;
  flex: 1;
  overflow-y: auto;
}

#klaro .cookie-modal .cm-modal .cm-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* === Purposes (Überkategorie) === */
#klaro .cookie-modal .cm-modal .cm-purposes > li {
  background: var(--bps-mint);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

#klaro .cm-purposes > li > .cm-list-title,
#klaro .cm-purposes > li label > .cm-list-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--bps-green);
}

#klaro .cm-purposes p.purpose,
#klaro .cm-purposes p.purposes,
#klaro .cm-purposes > li > p {
  font-size: 12px;
  color: var(--bps-text-light);
  margin: 6px 0 0 0;
  line-height: 1.5;
}

/* === Services (Unterkategorie, eingerückt) === */
#klaro .cm-purposes .cm-services {
  margin-top: 10px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--bps-border-soft);
}

#klaro .cm-services > li {
  background: var(--bps-white);
  border: 1px solid var(--bps-border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

#klaro .cm-services > li:last-child {
  margin-bottom: 0;
}

#klaro .cm-services .cm-list-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--bps-text);
}

#klaro .cm-services p {
  font-size: 12px;
  color: var(--bps-text-light);
  margin: 6px 0 0 0;
  line-height: 1.5;
}

#klaro .cm-services p.purposes,
#klaro .cm-services p.purpose {
  font-size: 11px;
  font-style: italic;
  margin-top: 4px;
}

/* Footer — Buttons immer (Desktop & Mobile) full-width gestackt
   #klaro#klaro doppelt = höhere Spezifität als Klaros gebundeltes CSS */
#klaro#klaro .cookie-modal .cm-modal .cm-footer {
  border-top: 1px solid var(--bps-border-soft);
  padding: 16px 20px 20px;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  background: var(--bps-white);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}

#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn,
#klaro#klaro .cookie-modal .cm-modal .cm-footer button {
  width: 100% !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 13px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: center;
}

#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn + .cm-btn,
#klaro#klaro .cookie-modal .cm-modal .cm-footer button + button {
  margin-top: 10px !important;
  margin-left: 0 !important;
}

/* Reihenfolge: Alle akzeptieren oben (primär), Auswahl speichern mitte, Alle ablehnen unten */
#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn-accept-all,
#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn-success {
  order: 1;
}
#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn-accept,
#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn-info {
  order: 2;
}
#klaro#klaro .cookie-modal .cm-modal .cm-footer .cm-btn-decline,
#klaro#klaro .cookie-modal .cm-modal .cm-footer .cn-decline {
  order: 3;
}

#klaro .cookie-modal .cm-modal .cm-footer .cm-powered-by {
  display: none;
}

/* === Toggle Switch — single visual control, native checkbox ausgeblendet === */
#klaro .cm-list-input,
#klaro input.cm-list-input,
#klaro input[type="checkbox"].cm-list-input {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

/* Label als Flex-Container: Toggle links, Titel rechts */
#klaro .cm-list-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

/* Toggle-Schalter */
#klaro .cm-list-label .cm-switch {
  width: 36px;
  height: 20px;
  background: #cbd5d2;
  border-radius: 999px;
  transition: background 0.2s ease;
  position: relative;
  flex-shrink: 0;
  display: inline-block;
}

#klaro .cm-list-label .cm-switch .slider,
#klaro .cm-list-label .cm-switch::after {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--bps-white);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  position: absolute;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: block;
}

/* Falls Klaro selbst eine .slider rendert, ::after ausblenden um Doppelung zu vermeiden */
#klaro .cm-list-label .cm-switch:has(.slider)::after {
  display: none;
}

#klaro .cm-list-input:checked + .cm-list-label .cm-switch,
#klaro .cm-list-label.checked .cm-switch {
  background: var(--bps-green);
}

#klaro .cm-list-input:checked + .cm-list-label .cm-switch .slider,
#klaro .cm-list-input:checked + .cm-list-label .cm-switch::after,
#klaro .cm-list-label.checked .cm-switch .slider,
#klaro .cm-list-label.checked .cm-switch::after {
  transform: translateX(16px);
}

#klaro .cm-list-input:disabled + .cm-list-label .cm-switch {
  background: #d4d4d4;
  cursor: not-allowed;
}

/* Klaros Auto-Context-Notice ausblenden — wir nutzen unseren eigenen Placeholder */
.context-notice,
#klaro .context-notice,
.klaro .context-notice,
.contact-map-wrapper .context-notice {
  display: none !important;
}

/* === Click-to-Load Map-Placeholder (Google Maps via Klaro) === */
.contact-map-wrapper {
  position: relative;
}

.contact-map-wrapper iframe[src=""] {
  display: none;
}

.map-consent-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bps-mint);
  color: var(--bps-text);
  padding: 48px 32px;
  min-height: 400px;
  gap: 12px;
  font-family: 'Poppins', -apple-system, sans-serif;
}

.contact-map-wrapper:has(iframe[src=""]) .map-consent-placeholder,
.contact-map-wrapper:has(iframe:not([src])) .map-consent-placeholder {
  display: flex;
}

.map-consent-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bps-white);
  color: var(--bps-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.map-consent-icon svg {
  width: 26px;
  height: 26px;
}

.map-consent-placeholder h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--bps-green);
  margin: 0;
  line-height: 1.3;
}

.map-consent-placeholder p {
  font-size: 14px;
  color: var(--bps-text-light);
  line-height: 1.55;
  margin: 0;
  max-width: 400px;
}

.map-consent-placeholder p a {
  color: var(--bps-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.map-consent-btn {
  margin-top: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 0;
  background: var(--bps-green);
  color: var(--bps-white);
  cursor: pointer;
  transition: transform .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.map-consent-btn:hover {
  transform: scale(1.05);
}

