.ptv-host {
  position: relative;
}

/* While the panel is up the player chrome underneath must not take clicks,
   otherwise the control bar swallows every press meant for Skip or Visit. */
.ptv-host > .vjs-control-bar,
.ptv-host > .vjs-big-play-button,
.ptv-host > .vjs-loading-spinner,
.ptv-host > .vjs-poster,
.ptv-host > .vjs-text-track-display,
.ptv-host > .vjs-modal-dialog,
.ptv-host > .vjs-title-bar {
  display: none !important;
  pointer-events: none !important;
}

.ptv-panel {
  position: absolute;
  inset: 0;
  z-index: 2147483000;
  background: #000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.ptv-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #000;
}

.ptv-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #000;
}

.ptv-controls {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ptv-timer {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.ptv-timer svg {
  width: 38px;
  height: 38px;
  transform: rotate(-90deg);
}

.ptv-timer circle {
  fill: none;
  stroke-width: 3;
}

.ptv-timer-track {
  stroke: rgba(255, 255, 255, .28);
}

.ptv-timer-fill {
  stroke: #32B0C6;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
  transition: stroke-dashoffset .2s linear;
}

.ptv-timer-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ptv-skip,
.ptv-cta {
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 16px;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.ptv-skip {
  background: rgba(0, 0, 0, .62);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
}

.ptv-skip:hover {
  background: rgba(0, 0, 0, .82);
  color: #fff;
}

.ptv-cta {
  background: #32B0C6;
  color: #0b0b0b;
  border: 1px solid #32B0C6;
}

.ptv-cta:hover {
  background: #2991A3;
  border-color: #2991A3;
  color: #0b0b0b;
  text-decoration: none;
}

.ptv-sound {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 3;
  pointer-events: auto;
  background: rgba(0, 0, 0, .68);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 15px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ptv-sound::before {
  content: "";
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background: currentColor;
  clip-path: polygon(0 35%, 32% 35%, 62% 8%, 62% 92%, 32% 65%, 0 65%);
}

.ptv-sound:hover {
  background: rgba(0, 0, 0, .86);
  color: #fff;
}

.ptv-skip:focus-visible,
.ptv-cta:focus-visible,
.ptv-sound:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Phone sizes. Every control keeps a 44px touch target, which is the smallest
   a thumb can hit reliably, and the row wraps instead of running off screen. */
@media (max-width: 640px) {
  .ptv-controls {
    right: 8px;
    bottom: 8px;
    left: 8px;
    gap: 8px;
    justify-content: flex-end;
  }

  .ptv-skip,
  .ptv-cta {
    padding: 12px 14px;
    font-size: 14px;
    min-height: 44px;
  }

  .ptv-cta {
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    white-space: nowrap;
  }

  .ptv-sound {
    left: 8px;
    top: 8px;
    padding: 12px 14px;
    min-height: 44px;
  }

  .ptv-timer,
  .ptv-timer svg {
    width: 36px;
    height: 36px;
  }

  .ptv-timer {
    flex-basis: 36px;
  }
}

/* Short landscape phones: the controls must not eat the creative. */
@media (max-height: 420px) and (orientation: landscape) {
  .ptv-controls {
    bottom: 6px;
    right: 6px;
  }

  .ptv-skip,
  .ptv-cta,
  .ptv-sound {
    padding: 9px 12px;
    min-height: 40px;
    font-size: 13px;
  }
}
