/**
 * Styles for `<video-consent-gate>` YouTube/Vimeo placeholders and hydrated frames.
 *
 * Kept unlayered so button and typography rules reliably win against unlayered
 * theme resets in `main.css` (e.g. `button { padding: 0; background-color: transparent; }`).
 */
video-consent-gate {
  --video-gate-bg: oklch(22.5% 0.032 248); /* #0f1e2e */
  --video-gate-surface: oklch(27.5% 0.035 248); /* #172a3e */
  --video-gate-border: oklch(40% 0.04 248); /* #364f69 */
  --video-gate-text: oklch(98% 0.005 248); /* #f7f9fb */
  --video-gate-muted: oklch(83% 0.015 248); /* #c2ccd6 */
  --video-gate-accent: oklch(67.0% 0.147 231.5); /* #159FDA */
  --video-gate-accent-hover: oklch(35.8% 0.095 247.6); /* #003E6B */

  display: block;
  inline-size: 100%;
  position: relative;
}

video-consent-gate[data-consent-state="loaded"] iframe {
  display: block;
  inline-size: 100%;
  border: 0;
}

/* Reapply absolute aspect-ratio fill only once consent is accepted */
video-wrapper video-consent-gate[data-consent-state="loaded"],
video-wrapper video-consent-gate[data-consent-state="loaded"] iframe {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

.careers-video-wrap video-consent-gate[data-consent-state="loaded"],
.careers-video-wrap video-consent-gate[data-consent-state="loaded"] iframe {
  inline-size: 100%;
  block-size: 100%;
}

/* Remove fixed aspect-ratio / height constraints while blocked so placeholder text is never clipped */
video-wrapper:has(video-consent-gate[data-consent-state="blocked"]),
video-wrapper[data-orientation="portrait"]:has(video-consent-gate[data-consent-state="blocked"]) {
  padding-bottom: 0;
  height: auto;
  max-height: none;
  width: 100%;
  overflow: visible;
}

.careers-video-wrap:has(video-consent-gate[data-consent-state="blocked"]) {
  height: auto;
  overflow: visible;
}

.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper:has(video-consent-gate[data-consent-state="blocked"])::before {
  display: none;
  padding-top: 0;
}

.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper:has(video-consent-gate[data-consent-state="blocked"]) video-consent-gate {
  position: relative;
  block-size: auto;
}

video-consent-gate .video-consent-gate__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-block-size: 0;
  block-size: auto;
  inline-size: 100%;
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  border-radius: 12px;
  border: 1px solid var(--video-gate-border);
  background: linear-gradient(160deg, var(--video-gate-surface) 0%, var(--video-gate-bg) 100%);
  color: var(--video-gate-text);
  text-align: center;
  box-sizing: border-box;
}

video-consent-gate .video-consent-gate__placeholder[hidden] {
  display: none !important;
}

video-consent-gate .video-consent-gate__icon {
  color: var(--video-gate-accent);
  flex-shrink: 0;
}

video-consent-gate .video-consent-gate__placeholder .video-consent-gate__title {
  display: block;
  margin-block: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--video-gate-text);
  text-wrap: balance;
}

video-consent-gate .video-consent-gate__placeholder .video-consent-gate__message {
  display: block;
  margin-block: 0;
  max-inline-size: 36ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--video-gate-muted);
}

video-consent-gate .video-consent-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 48px;
  margin-block-start: 0.5rem;
  padding-block: 0.75rem;
  padding-inline: 1.75rem;
  border: 0;
  border-radius: 999px;
  background-color: var(--video-gate-accent);
  color: oklch(100% 0 0); /* #ffffff */
  font-family: var(--theme-font-heading, 'Poppins SemiBold', sans-serif);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 8px 14px oklch(35.8% 0.095 247.6 / 0.4);
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}

video-consent-gate .video-consent-gate__btn:hover {
  background-color: var(--video-gate-accent-hover);
  color: oklch(100% 0 0); /* #ffffff */
}

video-consent-gate .video-consent-gate__btn:focus-visible {
  background-color: var(--video-gate-accent-hover);
  outline: 3px solid oklch(100% 0 0); /* #ffffff */
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  video-consent-gate .video-consent-gate__btn {
    transition: none;
  }
}
