/* Adapted bathroom player: preserve the original photo's intrinsic 4:3 flow.
   Breakpoint minimum heights, wrapper radius and spacing stay in styles.css. */
#bathroomTransitionEmbed {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  height: auto;
}

#bathroomTransitionEmbed .btp-video,
#bathroomTransitionEmbed .btp-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

#bathroomTransitionEmbed .btp-video {
  opacity: 0;
}

#bathroomTransitionEmbed.btp-has-started .btp-video {
  opacity: 1;
}

#bathroomTransitionEmbed .btp-poster {
  z-index: 2;
  opacity: 1;
  background: #fff;
}

/* No fade or early reveal: the cover stays opaque until a playing frame. */
#bathroomTransitionEmbed.btp-has-started .btp-poster {
  visibility: hidden;
  pointer-events: none;
}

#bathroomTransitionEmbed .btp-start,
#bathroomTransitionEmbed .btp-replay {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-content: center;
  justify-items: center;
  width: clamp(64px, 10vw, 104px);
  height: clamp(64px, 10vw, 104px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.025);
  color: rgba(255, 255, 255, 0.40);
  transform: translate(-50%, -50%);
}

#bathroomTransitionEmbed .btp-start svg,
#bathroomTransitionEmbed .btp-replay svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

#bathroomTransitionEmbed .btp-start svg {
  margin-left: 5px;
}

#bathroomTransitionEmbed .btp-replay span {
  font-size: 11px;
  line-height: 1.2;
}

/* Below the top-right label, away from the corner and bottom float. */
#bathroomTransitionEmbed .btp-controls {
  position: absolute;
  z-index: 3;
  top: 80px;
  right: 12px;
  display: flex;
  gap: 6px;
}

#bathroomTransitionEmbed .btp-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.70);
}

#bathroomTransitionEmbed .btp-controls svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

#bathroomTransitionEmbed button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(7, 89, 201, 0.8);
}

#bathroomTransitionEmbed .btp-message {
  position: absolute;
  z-index: 4;
  top: 136px;
  right: 12px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
}
