/**
 * Cartpanda compliance — Stripe Treat Trio only.
 * v8: nuclear hide legal dump + ribbon; 34px SECURE ORDER strip;
 * soft-bag always sticky above strip; body pad so content never covered.
 */

body:has(.tt-page) {
  --tt-softbag-space: 72px;
  --tt-cpd-strip: 34px;
}

/* Soft-bag Checkout: always on true bottom, never covered */
body:has(.tt-page) .tt-sticky-atc,
body:has(.tt-page) .tt-sticky-atc.is-on {
  display: block !important;
  bottom: 0 !important;
  z-index: 60 !important;
  pointer-events: auto !important;
}

body:has(.tt-page) .tt-sticky-atc[hidden] {
  display: block !important;
}

body:has(.tt-page) .tt-sticky-atc a,
body:has(.tt-page) .tt-sticky-atc button {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 61 !important;
}

/* Footer widget strip */
body:has(.tt-page) [id^="cpd-"].cpd-with-footer,
body:has(.tt-page) [id^="cpd-"].cpd-bottom,
body:has(.tt-page) .cpd-with-footer,
body:has(.tt-page) .cpd-bottom.cpd-with-footer {
  position: fixed !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  bottom: calc(var(--tt-softbag-space) + env(safe-area-inset-bottom, 0px)) !important;
  width: 100% !important;
  height: var(--tt-cpd-strip) !important;
  max-height: var(--tt-cpd-strip) !important;
  overflow: hidden !important;
  z-index: 50 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  background: #fff !important;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08) !important;
  pointer-events: none !important;
}

body:has(.tt-page) .cpd-with-footer .cpd-container,
body:has(.tt-page) .cpd-footer {
  height: var(--tt-cpd-strip) !important;
  max-height: var(--tt-cpd-strip) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 8px !important;
  margin: 0 !important;
  background: #fff !important;
}

body:has(.tt-page) .cpd-badge,
body:has(.tt-page) .cpd-badge > span {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  width: auto !important;
  transform: none !important;
  float: none !important;
}

body:has(.tt-page) .cpd-trust {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  color: #222 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body:has(.tt-page) .cpd-trust img,
body:has(.tt-page) .cpd-badge img,
body:has(.tt-page) .cpd-lock {
  height: 12px !important;
  max-height: 12px !important;
  width: auto !important;
}

/* LEGAL DUMP — nuclear visual hide, DOM kept */
body:has(.tt-page) .cpd-text,
body:has(.tt-page) .cpd-badge .cpd-text,
body:has(.tt-page) .cpd-footer .cpd-text,
body:has(.tt-page) .cpd-with-text .cpd-text,
body:has(.tt-page) #cp-advertising-disclaimer,
body:has(.tt-page) #cp-de-legal-links,
body:has(.tt-page) [id^="cpd-"] a[href*="buyers-seller-terms"],
body:has(.tt-page) [id^="cpd-"] a[href*="privacy-policy"],
body:has(.tt-page) [id^="cpd-"] a[href*="advertising-media"] {
  position: fixed !important;
  left: -100vw !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* Rotated ribbon / corner chip — gone */
body:has(.tt-page) .cpd-ribbon,
body:has(.tt-page) .cpd-ribbon > span,
body:has(.tt-page) [id^="cpd-"].cpd-sticky:not(.cpd-with-footer),
body:has(.tt-page) [id^="cpd-"].cpd-bottom-left:not(.cpd-with-footer),
body:has(.tt-page) .cpd-sticky:not(.cpd-with-footer) {
  position: fixed !important;
  left: -100vw !important;
  width: 1px !important;
  height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
  z-index: 0 !important;
}

body:has(.tt-page) .tt-page {
  padding-bottom: calc(
    var(--tt-softbag-space) + var(--tt-cpd-strip) + 20px + env(safe-area-inset-bottom, 0px)
  ) !important;
}

@media (max-width: 640px) {
  body:has(.tt-page) {
    --tt-cpd-strip: 32px;
    --tt-softbag-space: 72px;
  }
}


/* Our stable SECURE ORDER chip (Cartpanda widgets stay hidden for Validar) */
#tt-cpd-secure-chip {
  position: fixed;
  left: 0;
  right: 0;
  height: 28px;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
#tt-cpd-secure-chip .tt-cpd-secure-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 10px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.06em;
  color: #222;
  text-transform: uppercase;
}
