/* Sponsored video / GIF ads (AdVideo + AdCreativeView video layouts). Image ads are unaffected. */

.ad-video {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #0f1c2b;
  isolation: isolate;
}
.ad-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0f1c2b;
}
.ad-video.is-fullscreen {
  background: #000;
}
.ad-video.is-fullscreen .ad-video-el {
  object-fit: contain;
}

/* Control bar */
.ad-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1.4rem 0.55rem 0.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 18, 32, 0.62) 100%);
  pointer-events: none;
}
.ad-video-controls > * {
  pointer-events: auto;
}
.ad-video-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(8, 18, 32, 0.55);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ad-video-btn:hover {
  background: rgba(24, 119, 242, 0.85);
}
.ad-video-btn:active {
  transform: scale(0.94);
}
.ad-video-btn:focus-visible,
.ad-video-sound:focus-visible,
.ad-video-bigplay:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.ad-video-spacer {
  flex: 1 1 auto;
  pointer-events: none;
}

/* "Tap for sound" (muted-autoplay fallback) */
.ad-video-sound {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem 0.5rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #10243f;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(8, 18, 32, 0.35);
  cursor: pointer;
  animation: ad-video-pulse 1.8s ease-in-out infinite;
}
.ad-video-sound svg {
  font-size: 1.1rem;
  color: var(--teal-deep, #0d5bd7);
}
@keyframes ad-video-pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(8, 18, 32, 0.35), 0 0 0 0 rgba(255, 255, 255, 0.55); }
  50% { box-shadow: 0 8px 22px rgba(8, 18, 32, 0.35), 0 0 0 8px rgba(255, 255, 255, 0); }
}

/* Reduced motion: big play button, no pulse */
.ad-video-bigplay {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  margin: -1.7rem 0 0 -1.7rem;
  padding: 0 0 0 0.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #10243f;
  font-size: 1.5rem;
  box-shadow: 0 10px 26px rgba(8, 18, 32, 0.35);
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .ad-video-sound {
    animation: none;
  }
  .ad-video-btn {
    transition: none;
  }
}

/* Compact players (cards, inline, product cards) */
.ad-video--compact .ad-video-controls {
  gap: 0.3rem;
  padding: 1rem 0.35rem 0.35rem;
}
.ad-video--compact .ad-video-btn {
  width: 1.85rem;
  height: 1.85rem;
  font-size: 0.9rem;
}
.ad-video--compact .ad-video-sound {
  top: 0.4rem;
  left: 0.4rem;
  padding: 0.4rem 0.7rem 0.4rem 0.55rem;
  font-size: 0.75rem;
}

/* Media boxes that host a video must give it a height */
.ad-media > .ad-video,
.ad-bleed-media > .ad-video {
  position: absolute;
  inset: 0;
}
.ad-media:has(> .ad-video) {
  position: relative;
  aspect-ratio: 16 / 9;
  mix-blend-mode: normal;
}

/* ---- Mid-page / full-width video banner: video left, copy right ---- */
.ad-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  border-radius: 18px;
  border: 1px solid rgba(24, 119, 242, 0.12);
  background: linear-gradient(135deg, #f8fbff 0%, #e8f1fb 100%);
  box-shadow: 0 12px 28px rgba(42, 54, 66, 0.055);
  overflow: hidden;
}
.ad-split-media {
  position: relative;
  flex: 0 0 58%;
  max-width: 58%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #0f1c2b;
}
.ad-split-media > .ad-video {
  position: absolute;
  inset: 0;
}
.ad-split-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.25rem 1.5rem;
}
.ad-split-copy .ad-label {
  margin: 0;
}
.ad-split-copy h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink, #10243f);
}
.ad-split-copy p {
  margin: 0;
  color: var(--muted, #52657a);
  font-size: 0.95rem;
  line-height: 1.45;
}
.ad-split-copy .ad-cta {
  margin-top: 0.35rem;
  min-width: 8rem;
}
@media (max-width: 720px) {
  .ad-split {
    flex-direction: column;
    border-radius: 14px;
  }
  .ad-split-media {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
  }
  .ad-split-copy {
    padding: 0.95rem 1rem 1.05rem;
  }
  .ad-split-copy .ad-cta {
    width: 100%;
  }
}

/* Sidebar card with video: stack full-width player above title + CTA */
.ad-sidebar-card--video .ad-sidebar-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
}
.comm-col-left .ad-sidebar-card.ad-sidebar-card--video,
.comm-col-right .ad-sidebar-card.ad-sidebar-card--video,
.shop-sidebar-ad .ad-sidebar-card.ad-sidebar-card--video {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.comm-col-left .ad-sidebar-card--video .ad-sidebar-card-media,
.comm-col-right .ad-sidebar-card--video .ad-sidebar-card-media,
.shop-sidebar-ad .ad-sidebar-card--video .ad-sidebar-card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
}
.pcard--ad-video .pcard-main {
  display: block;
  color: inherit;
}

.ad-video-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Seek bar: click / drag / arrow keys */
.ad-video-seek {
  position: relative;
  flex: 1 1 auto;
  min-width: 48px;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.ad-video-seek-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: height 0.12s ease;
}
.ad-video-seek:hover .ad-video-seek-track,
.ad-video-seek.is-dragging .ad-video-seek-track,
.ad-video-seek:focus-visible .ad-video-seek-track {
  height: 6px;
}
.ad-video-seek-buffered,
.ad-video-seek-played {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: left center;
}
.ad-video-seek-buffered {
  background: rgba(255, 255, 255, 0.45);
  transform: scaleX(var(--seek-buffered, 0));
}
.ad-video-seek-played {
  background: #fff;
  transform: scaleX(var(--seek-played, 0));
}
.ad-video-seek-thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--seek-played, 0) * 100%);
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(8, 18, 32, 0.45);
  transform: scale(0.85);
  transition: transform 0.12s ease;
}
.ad-video-seek:hover .ad-video-seek-thumb,
.ad-video-seek.is-dragging .ad-video-seek-thumb,
.ad-video-seek:focus-visible .ad-video-seek-thumb {
  transform: scale(1.1);
}
.ad-video-seek:focus-visible .ad-video-seek-thumb {
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.75), 0 1px 4px rgba(8, 18, 32, 0.45);
}
.ad-video-time {
  flex: 0 0 auto;
  min-width: 5.6em;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: none;
}
.ad-video-btn--skip {
  font-size: 1.15rem;
}
@media (max-width: 480px) {
  .ad-video-btn--skip {
    display: none;
  }
}
.ad-video--compact .ad-video-time,
.ad-video--compact .ad-video-btn--skip {
  display: none;
}

/* Video ad titles link out (the player itself never navigates). */
.ad-title-link {
  color: inherit;
  text-decoration: none;
}
.ad-title-link:hover,
.ad-title-link:focus-visible {
  text-decoration: underline;
}

/* Animated GIF ads: no multiply blend (keeps frames painting in every browser). */
img.ad-gif[data-media="gif"] {
  mix-blend-mode: normal !important;
  background: #fff;
}

/* Image/GIF media link shown next to a CTA: layout exactly as the unlinked media (link box vanishes, clicks still navigate). */
.ad-media > a[tabindex="-1"] {
  display: contents;
}
