/* All components are isolated from the active theme's element-level styling. */
.tap-popup-overlay,
.tap-popup-overlay * {
  box-sizing: border-box;
}

.tap-popup-overlay {
  --tap-safe-top: max(16px, env(safe-area-inset-top, 0px));
  --tap-safe-right: max(16px, env(safe-area-inset-right, 0px));
  --tap-safe-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  --tap-safe-left: max(16px, env(safe-area-inset-left, 0px));
  --tap-popup-size: min(520px, calc(100vw - var(--tap-safe-left) - var(--tap-safe-right)), calc(100vh - var(--tap-safe-top) - var(--tap-safe-bottom)));
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  padding: var(--tap-safe-top) var(--tap-safe-right) var(--tap-safe-bottom) var(--tap-safe-left) !important;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 22, 20, .66);
  color: #202722;
  text-align: left;
  animation: tapPopupBackdrop 180ms ease-out both;
}

@supports (height: 100dvh) {
  .tap-popup-overlay {
    --tap-popup-size: min(520px, calc(100vw - var(--tap-safe-left) - var(--tap-safe-right)), calc(100dvh - var(--tap-safe-top) - var(--tap-safe-bottom)));
  }
}

.tap-popup-overlay .tap-popup-dialog {
  position: relative;
  isolation: isolate;
  display: block;
  width: var(--tap-popup-size);
  height: var(--tap-popup-size);
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 22px;
  outline: none;
  background: #fffdf8;
  color: #202722;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .3);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  animation: tapPopupEnter 220ms cubic-bezier(.2, .7, .2, 1) both;
}

.tap-popup-overlay .tap-popup-close {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 1px solid #d7ded8;
  border-radius: 50%;
  background: #fff;
  color: #17221c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  font: 400 30px/1 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  opacity: 1;
  transform: none;
}

.tap-popup-overlay .tap-popup-close:hover {
  background: #eff4ef;
  color: #17221c;
}

.tap-popup-overlay .tap-popup-close-mark {
  display: block;
  margin: -2px 0 0;
  padding: 0;
  font: inherit;
  line-height: 1;
  pointer-events: none;
}

.tap-popup-overlay .tap-popup-close:focus-visible,
.tap-popup-overlay .tap-popup-cta:focus-visible,
.tap-popup-overlay .tap-popup-poster:focus-visible,
.tap-popup-overlay .tap-popup-scroll:focus-visible {
  outline: 3px solid #135dff;
  outline-offset: -4px;
}

.tap-popup-overlay .tap-popup-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
}

.tap-popup-overlay .tap-popup-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.tap-popup-overlay .tap-popup-content {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, calc(var(--tap-popup-size) * .035), 20px);
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 65px clamp(18px, calc(var(--tap-popup-size) * .065), 34px) clamp(18px, calc(var(--tap-popup-size) * .06), 32px);
  background: linear-gradient(155deg, #fffefb, #f5f0e6);
  color: #202722;
}

.tap-popup-overlay .tap-popup-scroll {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 4px 2px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aab5ad transparent;
  -webkit-overflow-scrolling: touch;
}

.tap-popup-overlay .tap-popup-badge {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 15px;
  padding: 5px 10px;
  border: 1px solid var(--tap-accent, #128c7e);
  border-radius: 6px;
  background: #fffdf8;
  color: #273f33;
  font-family: inherit;
  font-size: clamp(11px, calc(var(--tap-popup-size) * .026), 13px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

.tap-popup-overlay .tap-popup-heading {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: none;
  color: #173b2c;
  font-family: inherit;
  font-size: clamp(19px, calc(var(--tap-popup-size) * .063), 32px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  overflow-wrap: anywhere;
}

.tap-popup-overlay .tap-popup-message {
  display: block;
  margin: 0;
  padding: 0;
  color: #39463d;
  font-family: inherit;
  font-size: clamp(14px, calc(var(--tap-popup-size) * .035), 18px);
  font-weight: 400;
  line-height: 1.85;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.tap-popup-overlay .tap-popup-cta {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: calc(var(--tap-popup-size) * .25);
  margin: 0;
  padding: 11px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--tap-accent, #128c7e);
  color: var(--tap-accent-ink, #fff);
  box-shadow: none;
  font-family: inherit;
  font-size: clamp(14px, calc(var(--tap-popup-size) * .034), 17px);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  overflow-wrap: anywhere;
  overflow-y: auto;
  cursor: pointer;
}

.tap-popup-overlay .tap-popup-cta:hover,
.tap-popup-overlay .tap-popup-cta:visited {
  background: var(--tap-accent, #128c7e);
  color: var(--tap-accent-ink, #fff);
  text-decoration: none;
}

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

@keyframes tapPopupBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tapPopupEnter {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tap-popup-overlay,
  .tap-popup-overlay .tap-popup-dialog {
    animation: none;
    scroll-behavior: auto;
  }
}

@media (forced-colors: active) {
  .tap-popup-overlay .tap-popup-dialog,
  .tap-popup-overlay .tap-popup-close,
  .tap-popup-overlay .tap-popup-cta {
    border: 1px solid CanvasText;
  }
}
