/* ==========================================================================
   Zenitech Vimeo Video Widget
   ========================================================================== */

/* ========= Design tokens ========= */

.zenitech-video-player {
  --player-radius: 0;
  --btn-dim: 36px;
  --btn-bg: #ffffff33;
  --track-col: rgba(255,255,255,.35);
  --thumb-col: #fff;

  --controls-width: 540px;
  --controls-height: 64px;
  --controls-bottom: 48px;

  --cc-gap: 12px;
  --cc-max: var(--controls-width);

  position: relative;
  width: 100%;
  max-width: 100%;
  display: block;
}

/* ========= Base media structure ========= */

.zenitech-video-player__wrap {
  width: 100%;
  max-width: 100%;
  display: block;
}

.zenitech-video-player__ratio,
.zenitech-video-player__background-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.zenitech-video-player__ratio {
  aspect-ratio: 16 / 9;
}

.zenitech-video-player__iframe,
.zenitech-video-player iframe,
.zenitech-video-player .vimeo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

/*
  All custom Vimeo players use custom controls.
  Prevent the iframe from stealing clicks/taps.
*/
.zenitech-video-player .js-vimeo-iframe {
  pointer-events: none;
}

/* ========= Captions and control stacking ========= */

.zenitech-video-player .cc-overlay,
.zenitech-video-player .video-captions-overlay {
  z-index: 10;
  pointer-events: none;
}

.zenitech-video-player .video-controls-wrapper {
  z-index: 20;
  pointer-events: none;
}

.zenitech-video-player .video-player,
.zenitech-video-player .video-player button,
.zenitech-video-player .video-player input {
  pointer-events: auto;
}

/* ==========================================================================
   Full controls
   ========================================================================== */

.zenitech-video-player--controls-overlay .video-controls-wrapper {
  position: absolute;
  left: 50%;
  bottom: var(--controls-bottom);
  transform: translateX(-50%);
  width: var(--controls-width);
  max-width: calc(100% - 32px);
  padding: 12px;
  border-radius: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  background-image: linear-gradient(90deg, #151728 15%, #3A7DA6 100%);
}

.zenitech-video-player .video-player {
  position: relative;
  z-index: 21;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  max-width: 100%;
  color: #fff;
  user-select: none;
  border-radius: var(--player-radius);
  padding-right: 4px;
}

.zenitech-video-player .video-player .main-line {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.zenitech-video-player .video-player .main-line .video-play-pause {
  flex: 0 0 var(--btn-dim);
}

.zenitech-video-player .video-player .main-line .video-meta {
  flex: 1 1 auto;
  margin-left: 16px;
  padding-right: 10px;
}

.zenitech-video-player .video-player .captions-control,
.zenitech-video-player .video-player .video-control {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.zenitech-video-player .video-player .captions-control {
  column-gap: 12px;
}

.zenitech-video-player .video-player .video-control {
  column-gap: 0;
}

/* ========= Play / pause button ========= */

.zenitech-video-player .video-play-pause {
  width: var(--btn-dim);
  height: var(--btn-dim);
  border-radius: 50%;
  border: 0;
  background: var(--btn-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  color: #fff;
  touch-action: manipulation;
}

.zenitech-video-player .video-icon-play {
  padding-left: 4px;
}

.zenitech-video-player .video-play-pause:hover,
.zenitech-video-player .video-play-pause:focus,
.zenitech-video-player .video-play-pause:focus-visible {
  background: rgba(255,255,255,.25);
}

/* ========= Meta text ========= */

.zenitech-video-player .video-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 16px;
  padding-right: 10px;
}

.zenitech-video-player .video-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #fff !important;
  line-height: 140%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.zenitech-video-player .video-time {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 11px;
  line-height: 140%;
  color: #fff;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  text-align: right;
  align-self: end;
}

/* ========= Progress slider ========= */

.zenitech-video-player .video-progress {
  grid-column: 1 / -1;
  grid-row: 2;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #fff 0%,
    #fff 0%,
    var(--track-col) 0%,
    var(--track-col) 100%
  );
}

.zenitech-video-player .video-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.zenitech-video-player .video-progress::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.zenitech-video-player .video-progress:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ========= Utility buttons ========= */

.zenitech-video-player .video-tool-btn,
.zenitech-video-player .video-volume-icon,
.zenitech-video-player .video-captions-toggle {
  background: none;
  border: 0;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .15s;
  touch-action: manipulation;
}

.zenitech-video-player .video-tool-btn:hover,
.zenitech-video-player .video-tool-btn:focus,
.zenitech-video-player .video-tool-btn:focus-visible {
  background: #ffffff01;
  border-radius: 100px;
}

.zenitech-video-player .video-volume-icon,
.zenitech-video-player .video-captions-toggle {
  width: var(--btn-dim);
  height: var(--btn-dim);
  padding: 10px;
  margin: 0;
}

/* ========= Volume slider ========= */

.zenitech-video-player .video-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 6px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #fff 0%,
    #fff 60%,
    var(--track-col) 60%,
    var(--track-col) 100%
  );
}

.zenitech-video-player .video-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0;
  height: 0;
}

.zenitech-video-player .video-volume::-moz-range-thumb {
  visibility: hidden;
  border: none;
}

.zenitech-video-player .video-volume:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ========= Icon font mapping and state visibility ========= */

.zenitech-video-player .video-player i::before {
  font-family: 'Zenitech-Icons-25' !important;
  font-style: normal;
  font-weight: 400;
  font-size: 1em;
  line-height: 1;
}

.zenitech-video-player .video-player i {
  display: none;
}

/* Play / pause icon states */
.zenitech-video-player .video-player.video-is-playing .video-icon-pause {
  display: inline-block !important;
}

.zenitech-video-player .video-player.video-is-playing .video-icon-play {
  display: none !important;
}

.zenitech-video-player .video-player:not(.video-is-playing) .video-icon-play {
  display: inline-block !important;
}

.zenitech-video-player .video-player:not(.video-is-playing) .video-icon-pause {
  display: none !important;
}

/* Mute / unmute icon states */
.zenitech-video-player .video-player.video-is-muted .video-icon-soundoff {
  display: inline-block !important;
}

.zenitech-video-player .video-player.video-is-muted .video-icon-sound {
  display: none !important;
}

.zenitech-video-player .video-player:not(.video-is-muted) .video-icon-sound {
  display: inline-block !important;
}

.zenitech-video-player .video-player:not(.video-is-muted) .video-icon-soundoff {
  display: none !important;
}

/* Captions icon states */
.zenitech-video-player .video-player.video-captions-on .video-icon-captions-off {
  display: inline-block !important;
}

.zenitech-video-player .video-player.video-captions-on .video-icon-captions-on {
  display: none !important;
}

.zenitech-video-player .video-player:not(.video-captions-on) .video-icon-captions-on {
  display: inline-block !important;
}

.zenitech-video-player .video-player:not(.video-captions-on) .video-icon-captions-off {
  display: none !important;
}

/* ========= Focus ========= */

.zenitech-video-player .video-tool-btn:focus-visible,
.zenitech-video-player .video-play-pause:focus-visible,
.zenitech-video-player .video-captions-toggle:focus-visible,
.zenitech-video-player .video-progress:focus-visible,
.zenitech-video-player .hero-video-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ========= Captions overlay ========= */

.zenitech-video-player .video-captions-overlay {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--controls-bottom) + var(--controls-height) + var(--cc-gap));
  display: inline-block;
  width: auto;
  max-width: var(--cc-max);
  box-sizing: border-box;
  padding: 12px 18px;
  border-radius: 8px;
  background: #0e0f1a;
  color: #fff;
  text-align: center;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.zenitech-video-player .video-captions-overlay .row {
  display: block;
  margin-top: .35em;
}

.zenitech-video-player .video-captions-overlay .row:first-child {
  margin-top: 0;
}

.zenitech-video-player .video-captions-overlay .cue {
  background: transparent;
  padding: 0;
  border-radius: 0;
  text-shadow: none;
}

/* ==========================================================================
   Full controls below video layout
   Used for smaller video cards, and for overlay controls after the mobile
   breakpoint. Controls are normal-flow content in this mode.
   ========================================================================== */

.zenitech-video-player--controls-below .zenitech-video-player__wrap {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
}

.zenitech-video-player--controls-below .zenitech-video-player__ratio,
.zenitech-video-player--controls-below .video-ratio {
  flex: 0 0 auto;
  overflow: hidden;
}

.zenitech-video-player--controls-below .video-controls-wrapper {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto;
  border-radius: 0 0 8px 8px;
  padding: 12px;
  z-index: 20;
  box-shadow: none;
  background-image: linear-gradient(90deg, #151728 15%, #3A7DA6 100%);
}

.zenitech-video-player--controls-below .video-captions-overlay {
  bottom: 12px !important;
  z-index: 10 !important;
}

/* ==========================================================================
   Minimal controls variant
   Play / pause only
   ========================================================================== */

.zenitech-video-player--minimal-controls .minimal-video-controls {
  position: absolute;
  inset: auto 0 24px 0;
  z-index: 20;
  display: block;
  width: 100%;
  height: 48px;
  pointer-events: none;
}

.zenitech-video-player--minimal-controls .minimal-video-play {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: auto;
}

.zenitech-video-player--minimal-controls .video-play-pause {
  width: 44px;
  height: 44px;
}

/* ==========================================================================
   Background video variant
   ========================================================================== */

.zenitech-video-player--background {
  position: relative;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.zenitech-video-player--background .zenitech-video-player__wrap,
.zenitech-video-player--background .zenitech-video-player__background-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.zenitech-video-player--background .zenitech-video-player__iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;

  /*
    Overscan slightly to prevent tiny black strips caused by sub-pixel
    rounding between Elementor container heights and Vimeo's iframe crop.
  */
  width: calc(100vw + 16px);
  height: calc(56.25vw + 16px);
  min-width: calc(177.78vh + 16px);
  min-height: calc(100vh + 16px);

  transform: translate(-50%, -50%);
  pointer-events: none;
}

.zenitech-video-player--background .zenitech-video-player__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0,0,0,.35);
  pointer-events: none;
}



.zenitech-video-player--fill-parent {
  min-height: 100%;
}

.zenitech-video-player--standalone-background {
  min-height: 520px;
}

/* ========= Elementor parent-container background mode =========

   When the widget setting "Fill parent container" is enabled,
   the widget is lifted out of normal flow and stretched across the
   nearest Elementor container/section/column. This lets the video behave
   like a true parent-container background while the other Elementor
   widgets remain visible above it.
*/

.zenitech-video-player__elementor-background-container {
  position: relative;
  overflow: hidden;
}

/*
  Important: for boxed Elementor containers, .e-con-inner is the max-width
  content wrapper. Keep it static so the absolutely positioned video widget
  uses the outer container/section as its containing block, not the boxed
  inner wrapper. This lets background video fill the full parent width.
*/
.zenitech-video-player__elementor-background-container > .e-con-inner {
  position: static !important;
}

.zenitech-video-player__elementor-background-container > .elementor-container {
  position: static !important;
}

.zenitech-video-player__elementor-background-container > .e-con-inner > .elementor-element:not(.zenitech-video-player__elementor-background-widget),
.zenitech-video-player__elementor-background-container > .elementor-element:not(.zenitech-video-player__elementor-background-widget),
.zenitech-video-player__elementor-background-container > .elementor-container > .elementor-column,
.zenitech-video-player__elementor-background-container > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-element:not(.zenitech-video-player__elementor-background-widget) {
  position: relative;
  z-index: 2;
}

.elementor-widget-zenitech_vimeo_video.zenitech-video-player__elementor-background-widget,
.elementor-widget[data-widget_type^="zenitech_vimeo_video"].zenitech-video-player__elementor-background-widget {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  pointer-events: none;
}

.elementor-widget-zenitech_vimeo_video.zenitech-video-player__elementor-background-widget > .elementor-widget-container,
.elementor-widget[data-widget_type^="zenitech_vimeo_video"].zenitech-video-player__elementor-background-widget > .elementor-widget-container,
.zenitech-video-player__elementor-background-widget .zenitech-video-player,
.zenitech-video-player__elementor-background-widget .zenitech-video-player__wrap,
.zenitech-video-player__elementor-background-widget .zenitech-video-player__background-media {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

/*
  Keep the fill-parent background crop slightly larger than the parent so
  no black edge appears at the bottom/edges on fractional pixel heights.
*/
.zenitech-video-player__elementor-background-widget .zenitech-video-player__background-media {
  overflow: hidden;
}

.zenitech-video-player__elementor-background-widget .zenitech-video-player__iframe {
  display: block;
  width: calc(100vw + 16px);
  height: calc(56.25vw + 16px);
  min-width: calc(177.78vh + 16px);
  min-height: calc(100vh + 16px);
}

.zenitech-video-player__elementor-background-widget .zenitech-video-player__background-media,
.zenitech-video-player__elementor-background-widget .zenitech-video-player__iframe,
.zenitech-video-player__elementor-background-widget .zenitech-video-player__overlay {
  pointer-events: none;
}

.zenitech-video-player__elementor-background-widget .zenitech-video-player__background-controls,
.zenitech-video-player__elementor-background-widget .zenitech-video-player__background-toggle {
  pointer-events: auto;
}

/* ========= Background pause toggle ========= */

.zenitech-video-player__background-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
}

.zenitech-video-player .visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.zenitech-video-player .hero-video-controls,
.zenitech-video-player .hero-video-controls:hover,
.zenitech-video-player .hero-video-controls:focus,
.zenitech-video-player .hero-video-controls:focus-visible,
.zenitech-video-player .hero-video-toggle,
.zenitech-video-player .hero-video-toggle:hover,
.zenitech-video-player .hero-video-toggle:focus,
.zenitech-video-player .hero-video-toggle:focus-visible {
  border: 0;
  color: #fff;
}

.zenitech-video-player .hero-video-toggle {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  background-color: #00000040;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 200px;
}

.zenitech-video-player .hero-video-toggle:hover,
.zenitech-video-player .hero-video-toggle:focus,
.zenitech-video-player .hero-video-toggle:focus-visible {
  border: 0;
  color: #fff;
  background-color: #00000080;
}

.zenitech-video-player .hero-video-icon::before {
  font-family: 'Zenitech-Icons-25' !important;
  font-size: 2em;
  line-height: 1;
  vertical-align: middle;
}

/* Glyphs */
.zenitech-video-player .zenitech-icon-pause-circle::before {
  content: "\e946";
}

.zenitech-video-player .zenitech-icon-play-circle::before {
  content: "\e947";
}

/* ==========================================================================
   Tablet and down
   Overlay controls move below the video and become normal-flow content.
   ========================================================================== */

@media (max-width: 834px) {
  .zenitech-video-player--controls-overlay .zenitech-video-player__wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .zenitech-video-player--controls-overlay .zenitech-video-player__ratio,
  .zenitech-video-player--controls-overlay .video-ratio {
    flex: 0 0 auto;
    overflow: hidden;
  }

  .zenitech-video-player--controls-overlay .video-controls-wrapper {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto;
    border-radius: 0 0 8px 8px;
    padding: 12px;
    z-index: 20;
    box-shadow: none;
    background-image: linear-gradient(90deg, #151728 15%, #3A7DA6 100%);
  }

  .zenitech-video-player--controls-overlay .video-captions-overlay {
    bottom: 12px !important;
    z-index: 10 !important;
    max-width: calc(100% - 24px);
  }

  .zenitech-video-player--minimal-controls .minimal-video-controls {
    bottom: 16px;
  }

  .zenitech-video-player .video-time {
    display:none
  }

  .zenitech-video-player--minimal-controls .video-play-pause {
    width: 48px;
    height: 48px;
  }

  .zenitech-video-player--background {
    min-height: 420px;
  }
}

/* ==========================================================================
   Mobile refinements
   ========================================================================== */

@media (max-width: 640px) {
  .zenitech-video-player .video-volume {
    display: block;
    width: 80px;
  }

  .zenitech-video-player .video-meta {
    gap: 4px 8px;
  }

  .zenitech-video-player .video-player {
    gap: 4px;
  }

  .zenitech-video-player .video-player .main-line {
    flex: 1 1 auto;
    min-width: 0;
  }

  .zenitech-video-player--minimal-controls .minimal-video-controls {
    bottom: 10px;
  }

  .zenitech-video-player--minimal-controls .video-play-pause {
    width: 44px;
    height: 44px;
  }

  .zenitech-video-player__background-controls {
    right: 12px;
    bottom: 12px;
    display: block;
  }

  .zenitech-video-player .hero-video-toggle {
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .zenitech-video-player .hero-video-icon::before {
    font-size: 1.35em;
  }
}


@media (max-width: 420px) {
  .zenitech-video-player .video-meta {
    margin-left: 10px;
    padding-right: 8px;
  }

  .zenitech-video-player .video-player .captions-control {
    column-gap: 6px;
  }

  .zenitech-video-player .video-volume {
    width: 64px;
  }
}

/* ==========================================================================
   Editor notice
   ========================================================================== */

.zenitech-video-player__notice {
  padding: 16px;
  background: #f5f5f5;
  border: 1px dashed #999;
  color: #333;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
/* ==========================================================================
   Elementor parent flow fix
   ========================================================================== */

.elementor-container.zenitech-video-player__parent-controls-flow,
.e-con-inner.zenitech-video-player__parent-controls-flow,
.e-con.zenitech-video-player__parent-controls-flow {
  display: block !important;
}
