.tps-popup {
  align-items: center;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 0;
  padding: 18px;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  transition: opacity 0.22s ease;
  z-index: 99999;
  font-family: "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tps-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.tps-popup__overlay {
  background: var(--tps-overlay-color, #0e1118);
  bottom: 0;
  left: 0;
  opacity: 0.62;
  position: absolute;
  right: 0;
  top: 0;
}

.tps-popup__dialog {
  background: var(--tps-dialog-bg, #ffffff);
  border-radius: var(--tps-radius, 8px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  max-height: calc(100vh - 36px);
  max-width: var(--tps-max-width, 760px);
  overflow: hidden;
  position: relative;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
  width: min(100%, var(--tps-max-width, 760px));
}

.tps-popup.is-visible .tps-popup__dialog {
  transform: translateY(0) scale(1);
}

.tps-popup__close {
  align-items: center;
  background: var(--tps-close-bg, #111827);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: 600 14px/1.1 "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  gap: 6px;
  min-height: 36px;
  padding: 8px 12px;
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
}

.tps-popup__close span:first-child {
  font-size: 20px;
  line-height: 14px;
}

.tps-slider {
  min-height: 260px;
  position: relative;
}

.tps-slider__track {
  display: grid;
}

.tps-slide {
  display: grid;
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.tps-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.tps-slide__image {
  background: #e5e7eb;
  display: block;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  width: 100%;
}

.tps-slide__media-link {
  display: block;
  outline: 0;
  text-decoration: none;
}

.tps-slide__media-link:hover .tps-slide__image,
.tps-slide__media-link:focus .tps-slide__image {
  filter: brightness(0.96);
}

.tps-slide__media-link:focus-visible {
  box-shadow: inset 0 0 0 3px var(--tps-button-bg, #2563eb);
}

.tps-slide__video {
  aspect-ratio: 16 / 9;
  background: #111827;
  width: 100%;
}

.tps-slide__video iframe {
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.tps-slide__html {
  background: var(--tps-content-bg, #f8fafc);
  color: var(--tps-text-color, #111827);
  font: 400 16px/1.6 "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 220px;
  overflow: auto;
  padding: 28px;
}

.tps-slide__html > :first-child {
  margin-top: 0;
}

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

.tps-slide__content {
  align-items: center;
  background: var(--tps-content-bg, #ffffff);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 18px 22px 22px;
}

.tps-slide__content h2 {
  color: var(--tps-text-color, #111827);
  font: 700 24px/1.25 "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

.tps-slide__button {
  background: var(--tps-button-bg, #2563eb);
  border-radius: 6px;
  color: var(--tps-button-text, #ffffff);
  flex: 0 0 auto;
  font: 700 15px/1 "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 12px 16px;
  text-decoration: none;
}

.tps-slide__button:hover,
.tps-slide__button:focus {
  background: var(--tps-button-bg, #1d4ed8);
  color: var(--tps-button-text, #ffffff);
  filter: brightness(0.94);
}

.tps-slider__nav {
  align-items: center;
  background: var(--tps-nav-bg, #111827);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 34px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  width: 42px;
  z-index: 3;
}

.tps-slider__nav--prev {
  left: 12px;
}

.tps-slider__nav--next {
  right: 12px;
}

.tps-slider__dots {
  bottom: 82px;
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  z-index: 3;
}

.tps-slider__dot {
  background: rgba(255, 255, 255, 0.75);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 10px;
  padding: 0;
  width: 10px;
}

.tps-slider__dot.is-active {
  background: var(--tps-button-bg, #2563eb);
  width: 24px;
}

.tps-theme-promo .tps-popup__dialog {
  border: 4px solid var(--tps-button-bg, #ef4444);
}

.tps-theme-promo .tps-slide__content {
  padding-top: 24px;
}

.tps-theme-minimal .tps-popup__dialog {
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.tps-theme-minimal .tps-popup__close,
.tps-theme-minimal .tps-slider__nav {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.tps-theme-dark .tps-popup__dialog {
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tps-theme-dark .tps-slide__content {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tps-theme-soft .tps-popup__dialog {
  box-shadow: 0 28px 90px rgba(124, 58, 237, 0.22);
}

.tps-theme-soft .tps-slide__button {
  border-radius: 999px;
}

.tps-theme-news .tps-slide__content {
  align-items: flex-start;
  flex-direction: column;
}

.tps-theme-news .tps-slide__content h2 {
  border-left: 5px solid var(--tps-button-bg, #dc2626);
  padding-left: 12px;
}

.tps-theme-luxury .tps-popup__dialog {
  border: 1px solid var(--tps-button-bg, #c8a24a);
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.34);
}

.tps-theme-luxury .tps-slide__button {
  letter-spacing: 0;
  text-transform: uppercase;
}

.tps-theme-rounded .tps-popup__dialog,
.tps-theme-rounded .tps-slide__button,
.tps-theme-rounded .tps-popup__close,
.tps-theme-rounded .tps-slider__nav {
  border-radius: 22px;
}

@media (max-width: 640px) {
  .tps-popup {
    padding: 8px;
  }

  .tps-popup__dialog {
    max-height: calc(100vh - 16px);
    width: calc(100vw - 16px);
  }

  .tps-slide__image {
    max-height: calc(100vh - 190px);
    object-fit: contain;
  }

  .tps-slide__html {
    min-height: 180px;
    padding: 20px 16px;
  }

  .tps-slide__content {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px 16px;
  }

  .tps-slide__content h2 {
    font-size: 20px;
    padding-right: 72px;
  }

  .tps-slide__button {
    text-align: center;
    width: 100%;
  }

  .tps-slider__nav {
    height: 36px;
    width: 36px;
  }

  .tps-slider__dots {
    bottom: 108px;
  }
}
