/* TankPuls Cookie-Consent — kompakt im Default, weitet sich bei Settings auf */
.tp-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 720px;
  margin: 0 auto;
  z-index: 9999;
  background: #0c1822;
  color: #f3f7fa;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.45), 0 4px 14px -4px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 320ms cubic-bezier(.2, .8, .2, 1),
    transform 320ms cubic-bezier(.2, .8, .2, 1),
    max-width 360ms cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
}
.tp-consent.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* Expanded: breiter, mehr Atemraum */
.tp-consent.is-expanded {
  max-width: 920px;
}

.tp-consent__inner {
  padding: 16px 18px;
  transition: padding 240ms cubic-bezier(.2, .8, .2, 1);
}
.tp-consent.is-expanded .tp-consent__inner {
  padding: 22px 24px;
}

.tp-consent__top {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.tp-consent__text {
  flex: 1;
  min-width: 240px;
}

.tp-consent__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.005em;
  color: #fff;
  transition: font-size 240ms;
}
.tp-consent.is-expanded .tp-consent__title {
  font-size: 17px;
  margin-bottom: 6px;
}

.tp-consent__desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(243, 247, 250, 0.65);
  margin: 0;
  transition: font-size 240ms;
}
.tp-consent.is-expanded .tp-consent__desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(243, 247, 250, 0.72);
}
/* Compact: kürzere Description anzeigen */
.tp-consent__desc-long { display: none; }
.tp-consent.is-expanded .tp-consent__desc-long { display: inline; }
.tp-consent.is-expanded .tp-consent__desc-short { display: none; }
.tp-consent__desc a {
  color: #14d8c0;
  border-bottom: 1px solid rgba(20, 216, 192, 0.4);
  transition: color 160ms, border-color 160ms;
}
.tp-consent__desc a:hover {
  color: #5ee9d4;
  border-bottom-color: #5ee9d4;
}

.tp-consent__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.tp-consent__btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms, border-color 160ms, color 160ms, transform 100ms, padding 240ms;
  white-space: nowrap;
}
.tp-consent.is-expanded .tp-consent__btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
}
.tp-consent__btn:active { transform: scale(0.97); }
.tp-consent__btn--primary {
  background: #14d8c0;
  color: #0c1822;
  font-weight: 600;
}
.tp-consent__btn--primary:hover { background: #5ee9d4; }
.tp-consent__btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f7fa;
  border-color: rgba(255, 255, 255, 0.12);
}
.tp-consent__btn--secondary:hover { background: rgba(255, 255, 255, 0.14); }
.tp-consent__btn--ghost {
  background: transparent;
  color: rgba(243, 247, 250, 0.72);
}
.tp-consent__btn--ghost:hover { color: #f3f7fa; background: rgba(255, 255, 255, 0.06); }

.tp-consent__details {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
}
/* Wichtig: HTML `hidden` Attribut soll die `display: grid` Regel überstimmen,
   damit Kategorien initial eingeklappt sind. */
.tp-consent__details[hidden] {
  display: none !important;
}

.tp-consent__cat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 18px;
}

.tp-consent__cat-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}
.tp-consent__cat-head h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #fff;
  letter-spacing: -0.005em;
}
.tp-consent__cat-head p {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(243, 247, 250, 0.62);
  margin: 0;
  max-width: 640px;
}

.tp-consent__lock {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(20, 216, 192, 0.8);
  background: rgba(20, 216, 192, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  align-self: center;
}

.tp-consent__switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  align-self: center;
  cursor: pointer;
}
.tp-consent__switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.tp-consent__switch span {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  transition: background 200ms;
}
.tp-consent__switch span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 200ms cubic-bezier(.2, 1.4, .2, 1);
}
.tp-consent__switch input:checked + span {
  background: #14d8c0;
}
.tp-consent__switch input:checked + span::before {
  transform: translateX(18px);
}
.tp-consent__switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(20, 216, 192, 0.35);
}

.tp-consent__details-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

/* Mobile */
@media (max-width: 720px) {
  .tp-consent {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 14px;
  }
  .tp-consent__inner { padding: 18px 18px; }
  .tp-consent__top { gap: 14px; }
  .tp-consent__actions {
    width: 100%;
    flex-direction: column;
  }
  .tp-consent__btn { width: 100%; }
  .tp-consent__cat-head {
    flex-direction: column;
    gap: 12px;
  }
  .tp-consent__lock { align-self: flex-start; }
  .tp-consent__switch { align-self: flex-start; }
}

/* Karten-Platzhalter, wenn maps-Consent fehlt */
.tp-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background: #0c1822;
  color: rgba(243, 247, 250, 0.78);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  z-index: 1;
}
.tp-map-placeholder__icon {
  width: 48px;
  height: 48px;
  opacity: 0.5;
  color: rgba(20, 216, 192, 0.7);
}
.tp-map-placeholder__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #fff;
}
.tp-map-placeholder__desc {
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 360px;
  margin: 0;
  color: rgba(243, 247, 250, 0.6);
}
.tp-map-placeholder__btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(20, 216, 192, 0.4);
  background: rgba(20, 216, 192, 0.1);
  color: #14d8c0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms, border-color 160ms;
  margin-top: 4px;
}
.tp-map-placeholder__btn:hover {
  background: rgba(20, 216, 192, 0.18);
  border-color: rgba(20, 216, 192, 0.7);
}
