/* Video Gate / Player — see functions/video-gate.php */

.synexis-video {
  margin: 0 0 2rem;
  position: relative;
}

/* Post title shown directly above the video. */
.synexis-video__post-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  font-weight: 600;
  color: #16292f; /* $primary-darker */
  margin: 0 0 1rem;
}

/* Editor-only "Reset gate" testing control. */
.synexis-video__reset {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5a6b73;
  background: #eef2f4;
  border: 1px dashed #b7c2c8;
  border-radius: 4px;
  cursor: pointer;
}
.synexis-video__reset:hover {
  background: #e2e8eb;
  color: #2f3437;
}

.synexis-video__ce {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #4a4a4a;
  background: #f4f7f9;
  border-left: 3px solid #2f3437;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.synexis-video__ce p {
  margin: 0;
}

/* Responsive 16:9 player wrapper (mirrors theme .responsive-embed). */
.synexis-video__player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
}
.synexis-video__player iframe,
.synexis-video__player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gate (locked) state */
.synexis-video__gate {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  /* background: #5fd0e0; $secondary */
}
/* The thumbnail itself is a transparent, full-bleed click target (a <button>).
   No dark scrim — the thumb stays fully visible; a subtle play icon signals it's
   clickable. Clicking anywhere reveals the form. */
.synexis-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.synexis-video__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
}
.synexis-video__poster:hover::after {
  background: rgba(0, 0, 0, 0.12);
}

/* Subtle circular play affordance, centered (doesn't obscure the thumb). */
.synexis-video__play-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.synexis-video__poster:hover .synexis-video__play-icon {
  transform: scale(1.06);
  background: #fff;
}
.synexis-video__play-icon::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.8rem 0 0.8rem 1.3rem;
  border-color: transparent transparent transparent #16292f; /* $primary-darker */
  margin-left: 0.28rem;
}

/* Inline form panel slides over the poster ($secondary bg → the form reuses the
   site's .contact-form--gravity styling: dark labels/inputs + navy CTA all read
   correctly on the light cyan, same as the v2 landing form). */
.synexis-video__form {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
  background: #f4f4f4; /* light gray */
  color: #16292f; /* $primary-darker */
}
.synexis-video__form[hidden] {
  display: none;
}
.synexis-video__form .gform_wrapper {
  margin: 0;
}
.synexis-video__form-intro {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.synexis-video__form-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: 0;
  color: #16292f;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.synexis-video__form-close:hover {
  opacity: 1;
}
.synexis-video__form-missing {
  color: #b1391f;
}

/* While we fetch + mount the player after unlock */
.synexis-video.is-loading .synexis-video__gate {
  opacity: 0.5;
  pointer-events: none;
}

/* Consent checkboxes: the "I agree…" choice text is the consent statement, so
   visually hide the redundant field-level label (it otherwise inherits the
   theme's floating-label treatment and overlaps the checkbox text). Kept in the
   DOM for screen readers. */
.synexis-video .gfield--type-checkbox .gfield_label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
/* Keep consent rows comfortably spaced now that the label is gone. */
.synexis-video .gfield--type-checkbox {
  margin-top: 0.25rem;
}

/* ──────────────────────────────────────────────────────────────────────────
   Landing layout (v2) — A&M-style: intro copy + lead form shown directly on the
   page. The form itself is wrapped in .contact-form--gravity so it inherits the
   site's existing Gravity Forms styling (floating labels, fields, brand CTA);
   we only reset the gate's positioning here.
   ────────────────────────────────────────────────────────────────────────── */
.synexis-video--landing .synexis-video__gate--landing {
  position: static;
  width: 100%;
  height: auto;
  padding: 0;
  background: none;
  border-radius: 0;
}
.synexis-video--landing .synexis-video__landing-intro {
  font-size: 1.0625rem;
  margin: 0 0 1.5rem;
}
.synexis-video--landing .synexis-video__form--inline {
  position: static;
  inset: auto;
  padding: 0;
  background: none;
  color: inherit;
  overflow: visible;
  max-width: 100%;
}
