/* ADV video teaser — modal + text fallback; poster uses static_photo layout (no crop rules) */

.hp-ad__media[data-hp-ad-video-open],
.hp-ad-link[data-hp-ad-video-open] {
  cursor: pointer;
}

/* slide-video.png canvas has ~34px transparent margin; match pale banner fill so
   compositing on the page equals the direct PNG (browser tab uses a dark backdrop). */
body.home .hp-home-ad-rectangle__stack .hp-ad--small_2 .hp-ad__media,
body.front-page .hp-home-ad-rectangle__stack .hp-ad--small_2 .hp-ad__media {
  background-color: #fdf7ef !important;
}

/* Text fallback when poster_url is missing */
.hp-ad--video-teaser {
  width: 100%;
}

.hp-ad-video-teaser {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.hp-ad-video-teaser:disabled {
  cursor: default;
  opacity: 0.92;
}

.hp-ad-video-teaser__poster {
  position: relative;
  flex: 0 0 42%;
  min-height: 120px;
  border-radius: 14px;
  background: #1e293b center/cover no-repeat;
  overflow: hidden;
}

.hp-ad-video-teaser:hover .hp-ad-video-teaser__play,
.hp-ad-video-teaser:focus-visible .hp-ad-video-teaser__play {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.55));
}

.hp-ad-video-teaser__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.42));
  transition: background 0.2s ease;
  pointer-events: none;
}

.hp-ad-video-teaser__play::after {
  content: "";
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  clip-path: polygon(38% 28%, 38% 72%, 72% 50%);
}

.hp-ad-video-teaser__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px 6px 0;
  pointer-events: none;
}

.hp-ad-video-teaser__headline {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 850;
  color: #0f172a;
}

.hp-ad-video-teaser__body {
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.hp-ad-video-teaser__cta {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f17a2a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.hp-ad-video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hp-ad-video-modal.is-open {
  display: flex;
}

.hp-ad-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
}

.hp-ad-video-modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.hp-ad-video-modal__close {
  position: absolute;
  top: -12px;
  right: -6px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hp-ad-video-modal__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.hp-ad-video-modal__player {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

body.hp-ad-video-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .hp-ad-video-teaser {
    flex-direction: column;
    gap: 10px;
  }

  .hp-ad-video-teaser__poster {
    flex: none;
    width: 100%;
    min-height: 140px;
  }

  .hp-ad-video-teaser__copy {
    padding: 0 2px 4px;
  }

  .hp-ad-video-modal {
    padding: 12px;
  }

  .hp-ad-video-modal__panel {
    width: min(96vw, 100%);
  }

  .hp-ad-video-modal__close {
    top: 8px;
    right: 8px;
  }
}
