/* =========================================================
   Recruit YouTube: PC = custom thumbnail, mobile = YouTube embed
   Shared across all recruit pages
========================================================= */

.recruit-youtube {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.recruit-youtube__trigger,
.recruit-youtube__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.recruit-youtube__trigger {
  z-index: 2;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #111;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
}

.recruit-youtube__trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recruit-youtube__trigger:focus-visible {
  outline: 3px solid #ffdc45;
  outline-offset: -3px;
}

.recruit-youtube__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 50px;
  border-radius: 13px;
  background: #f00;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.recruit-youtube__play::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 19px solid #fff;
}

.recruit-youtube__player {
  z-index: 1;
}

/* Existing interview iframe rules must not shrink or offset this embed. */
.recruit-youtube .recruit-youtube__player iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Hide the thumbnail once the iframe is active. */
.recruit-youtube.is-playing .recruit-youtube__trigger,
.recruit-youtube.is-mobile .recruit-youtube__trigger {
  display: none;
}

/* Only the new interview movie wrapper uses the shared 16:9 aspect ratio.
   Remove the old aspect-ratio spacer without changing the existing frame. */
.recruit-interview-movie__video.recruit-interview-movie__video--enhanced::before {
  display: none;
  content: none;
}

@media screen and (max-width: 768px) {
  .recruit-youtube__play {
    width: 60px;
    height: 42px;
  }
}
