/* xLocums featured video jobs: half-height preview + lightbox (1.4.9).
   Front-end module CSS for xlocums-timesheets.

   This file is also safe to paste into WordPress Additional CSS:
   it has no less-than or greater-than characters, including in comments.

   What it does:
   1. Shortens the on-page preview from a full 9:16 frame (padding-top 177.777%)
      to about half that height (padding-top 88.888%, a 9:8 box).
   2. Keeps the navy info box and Apply now button unchanged.
   3. Crops the 9:16 poster/video with object-fit cover, pinned toward the
      faces and the top title plates (object-position center 20%).
   4. Hides native video controls on the preview.
   5. Uses a YouTube-style play badge: a white triangle on a dark translucent
      circle (rgba 0,0,0,0.55), slightly darker on hover. Never blue or yellow.
   6. Removes the full-preview colored overlay. The play button still covers
      the whole frame for an easy tap target, but its background stays
      transparent in hover, focus, and active states, beating the v142
      Additional CSS blue wash and any theme button hover (including yellow).
      Hover is only a slight image darken and a 1.03 zoom.
   7. Styles the lightbox (.xl-fj-lightbox). The close control is a white X
      on a dark translucent circle, slightly darker on hover, never yellow.
   8. Uses the padding-top / height 0 box at every breakpoint so iPad Safari
      cannot collapse the media (the same method as tablet-fix v148).

   Specificity is higher than the widget CSS, the v148 Additional CSS
   resets, and the v142 .xl-fj-play hover rule (.xl-fj .xl-fj-play beats
   .xl-fj-play), so this wins without editing Additional CSS.

   Off switch is in the PHP module, not here.
*/

.xl-fj .xl-fj-media {
  position: relative !important;
  width: 100% !important;
  height: 0 !important;
  padding-top: 88.888% !important;
  aspect-ratio: auto !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
  background: #000 !important;
}

.xl-fj .xl-fj-media video {
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  object-position: center 20% !important;
  background: #000 !important;
  pointer-events: none;
  transform: scale(1);
  transform-origin: center center;
  filter: none;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.xl-fj .xl-fj-media:hover video,
.xl-fj .xl-fj-media:focus-within video {
  transform: scale(1.03);
  filter: brightness(0.92);
}

.xl-fj .xl-fj-media video::-webkit-media-controls,
.xl-fj .xl-fj-media video::-webkit-media-controls-enclosure,
.xl-fj .xl-fj-media video::-webkit-media-controls-panel {
  display: none !important;
  opacity: 0 !important;
}

/* The button is the full-frame tap target. Keep it visually empty so the
   v142 blue wash and theme button hover cannot color the whole preview. */
.xl-fj .xl-fj-play,
.xl-fj .xl-fj-play:hover,
.xl-fj .xl-fj-play:focus,
.xl-fj .xl-fj-play:focus-visible,
.xl-fj .xl-fj-play:active,
.xl-fj button.xl-fj-play,
.xl-fj button.xl-fj-play:hover,
.xl-fj button.xl-fj-play:focus,
.xl-fj button.xl-fj-play:focus-visible,
.xl-fj button.xl-fj-play:active {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none;
  color: #ffffff !important;
  cursor: pointer;
  opacity: 1 !important;
  filter: none !important;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
}

.xl-fj .xl-fj-play:focus-visible {
  outline: none;
}

/* Keep the play control visible even if the in-widget script adds is-playing. */
.xl-fj .xl-fj-card.is-playing .xl-fj-play {
  display: flex !important;
}

/* Neutral YouTube-style badge: white triangle on a dark translucent circle. */
.xl-fj .xl-fj-play span,
.xl-fj .xl-fj-play:hover span,
.xl-fj .xl-fj-play:focus span,
.xl-fj .xl-fj-play:focus-visible span,
.xl-fj .xl-fj-play:active span,
.xl-fj .xl-fj-play:hover *,
.xl-fj .xl-fj-play:focus * {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.55) !important;
  background-color: rgba(0, 0, 0, 0.55) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
  fill: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
  pointer-events: none;
  transition: background-color 0.2s ease;
}

.xl-fj .xl-fj-play:hover span,
.xl-fj .xl-fj-play:focus span,
.xl-fj .xl-fj-play:focus-visible span,
.xl-fj .xl-fj-play:active span {
  background: rgba(0, 0, 0, 0.72) !important;
  background-color: rgba(0, 0, 0, 0.72) !important;
}

.xl-fj .xl-fj-play:focus-visible span {
  outline: 2px solid #FBFAF6;
  outline-offset: 3px;
}

.xl-fj .xl-fj-play svg,
.xl-fj .xl-fj-play:hover svg,
.xl-fj .xl-fj-play:focus svg,
.xl-fj .xl-fj-play:active svg {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  margin-left: 3px !important;
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  fill: #ffffff !important;
  stroke: none !important;
  filter: none !important;
  box-shadow: none !important;
}

/* -------------------------------------------------------------------------- */
/* Lightbox                                                                   */
/* -------------------------------------------------------------------------- */

.xl-fj-lightbox {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(0, 18, 51, 0.88);
  -webkit-overflow-scrolling: touch;
}

.xl-fj-lightbox[hidden] {
  display: none !important;
}

.xl-fj-lightbox__dialog {
  position: relative;
  width: min(420px, 92vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.xl-fj-lightbox__frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 177.777%;
  max-height: 86vh;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* When the viewport is shorter than a full 9:16 column, cap the frame
   to the viewport and let the video letterbox rather than overflow. */
@media (max-height: 820px) {
  .xl-fj-lightbox__frame {
    padding-top: 0;
    height: min(86vh, calc(92vw * 1.77777));
    width: min(420px, calc(86vh * 0.5625), 92vw);
  }
}

.xl-fj-lightbox__frame video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.xl-fj-lightbox .xl-fj-lightbox__close,
.xl-fj-lightbox .xl-fj-lightbox__close:hover,
.xl-fj-lightbox .xl-fj-lightbox__close:focus,
.xl-fj-lightbox .xl-fj-lightbox__close:focus-visible,
.xl-fj-lightbox .xl-fj-lightbox__close:active,
.xl-fj-lightbox button.xl-fj-lightbox__close,
.xl-fj-lightbox button.xl-fj-lightbox__close:hover,
.xl-fj-lightbox button.xl-fj-lightbox__close:focus,
.xl-fj-lightbox button.xl-fj-lightbox__close:focus-visible,
.xl-fj-lightbox button.xl-fj-lightbox__close:active {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 2;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.55) !important;
  background-color: rgba(0, 0, 0, 0.55) !important;
  background-image: none !important;
  color: #ffffff !important;
  fill: #ffffff !important;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  filter: none !important;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent !important;
}

.xl-fj-lightbox .xl-fj-lightbox__close:hover,
.xl-fj-lightbox .xl-fj-lightbox__close:focus,
.xl-fj-lightbox .xl-fj-lightbox__close:focus-visible,
.xl-fj-lightbox .xl-fj-lightbox__close:active,
.xl-fj-lightbox button.xl-fj-lightbox__close:hover,
.xl-fj-lightbox button.xl-fj-lightbox__close:focus-visible,
.xl-fj-lightbox button.xl-fj-lightbox__close:active {
  background: rgba(0, 0, 0, 0.75) !important;
  background-color: rgba(0, 0, 0, 0.75) !important;
  color: #ffffff !important;
}

.xl-fj-lightbox .xl-fj-lightbox__close:focus-visible {
  outline: 2px solid #FBFAF6;
  outline-offset: 3px;
}

.xl-fj-lightbox .xl-fj-lightbox__close svg {
  display: block;
  width: 18px;
  height: 18px;
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
}

body.xl-fj-lightbox-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .xl-fj .xl-fj-media video,
  .xl-fj .xl-fj-media:hover video,
  .xl-fj .xl-fj-media:focus-within video,
  .xl-fj .xl-fj-play span,
  .xl-fj-lightbox,
  .xl-fj-lightbox__close {
    transition: none;
    transform: none;
    filter: none;
  }
}
