.tpop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

/* Some themes add .lang-rtl without switching the text direction */
.lang-rtl .tpop,
[dir="rtl"] .tpop {
  direction: rtl;
}

.tpop[hidden] {
  display: none;
}

.tpop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Without overlay the page behind stays clickable */
.tpop--no-overlay {
  pointer-events: none;
}

.tpop--no-overlay .tpop__dialog {
  pointer-events: auto;
}

/* Positions */
.tpop--top {
  align-items: flex-start;
}

.tpop--bottom-right {
  align-items: flex-end;
  justify-content: flex-end;
}

.tpop--bottom-left {
  align-items: flex-end;
  justify-content: flex-start;
}

.tpop__overlay {
  position: absolute;
  inset: 0;
  background: var(--tpop-overlay, rgba(0, 0, 0, .6));
}

.tpop__dialog {
  position: relative;
  width: 100%;
  max-width: var(--tpop-width, 600px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: var(--tpop-padding, 30px);
  border-radius: var(--tpop-radius, 8px);
  background: var(--tpop-bg, #fff);
  color: var(--tpop-text, #222);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  box-sizing: border-box;
  outline: none;
  transition: transform .3s ease, opacity .3s ease;
}

.tpop__content img,
.tpop__content video {
  max-width: 100%;
  height: auto;
}

.tpop__content > :last-child {
  margin-bottom: 0;
}

.tpop__close {
  position: absolute;
  top: 6px;
  inset-inline-end: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tpop-close, #333);
  font-size: 28px;
  line-height: 36px;
  cursor: pointer;
  opacity: .7;
}

.tpop__close:hover,
.tpop__close:focus {
  opacity: 1;
}

.tpop__dismiss {
  margin: 15px 0 0;
  text-align: center;
  font-size: .9em;
}

.tpop__dismiss a {
  color: inherit;
  opacity: .7;
  text-decoration: underline;
}

/* Newsletter */
.tpop__nl {
  margin: 20px 0 0;
}

.tpop__nl-row {
  display: flex;
  gap: 8px;
}

.tpop__nl-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 4px;
  background: #fff;
  color: #222;
  font: inherit;
}

.tpop__nl-btn {
  flex: 0 0 auto;
  padding: 10px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--tpop-btn-bg, #25b9d7);
  color: var(--tpop-btn-text, #fff);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tpop__nl-btn:hover {
  filter: brightness(.92);
}

.tpop__nl.is-loading .tpop__nl-btn {
  opacity: .6;
  cursor: wait;
}

.tpop__nl-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 10px 0 0;
  font-size: .85em;
  font-weight: normal;
  cursor: pointer;
}

.tpop__nl-consent input {
  margin-top: 3px;
}

.tpop__nl-msg {
  margin: 8px 0 0;
  font-size: .9em;
  color: #c0392b;
}

.tpop__nl-msg:empty {
  display: none;
}

.tpop__nl-success {
  margin: 20px 0 0;
  padding: 12px;
  border-radius: 4px;
  background: rgba(46, 204, 113, .15);
  text-align: center;
  font-weight: 600;
}

/* Visually hidden without an offset: a negative "left" creates a scrollbar in RTL */
.tpop__hp {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@media (max-width: 480px) {
  .tpop__nl-row {
    flex-direction: column;
  }
}

/* Animations */
.tpop--anim-zoom .tpop__dialog {
  transform: scale(.9);
}

.tpop--anim-slide-up .tpop__dialog {
  transform: translateY(40px);
}

.tpop.is-open .tpop__dialog {
  transform: none;
}

.tpop--anim-none,
.tpop--anim-none .tpop__dialog {
  transition: none;
}

body.tpop-lock {
  overflow: hidden;
}


@media (prefers-reduced-motion: reduce) {
  .tpop,
  .tpop__dialog {
    transition: none;
  }
}
