/* overview-film.css — a product's overview film on its front page.
 * Behaviour and the markup contract: js/components/overview-film.js.
 *
 * The page supplies its accent through two tokens on the .ovf element:
 *   --ovf-accent     the watch button and focus ring
 *   --ovf-on-accent  text on that accent
 * The frame and the dialog are deliberately dark in every theme: they hold a video,
 * and a light theme's surface around a playing film reads as a page, not a player.
 * That is the same opt-out the page chrome takes, and no text sits on the dark
 * ground except on the accent button. */

.ovf {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
}

.ovf-loop {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ovf-watch {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ovf-accent, #10b981);
  color: var(--ovf-on-accent, #fff);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5);
  transition: transform .15s ease;
}

.ovf-watch:hover { transform: translateY(-1px); }

.ovf-watch:focus-visible,
.ovf-close:focus-visible {
  outline: 3px solid var(--ovf-accent, #10b981);
  outline-offset: 3px;
}

.ovf-watch svg { width: 18px; height: 18px; flex: none; }

.ovf-dialog {
  width: min(1120px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #000;
  overflow: visible;
}

.ovf-dialog::backdrop { background: rgba(0, 0, 0, .82); }

.ovf-full {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #000;
}

.ovf-close {
  position: absolute;
  top: -48px;
  right: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 640px) {
  .ovf { border-radius: 12px; }
  .ovf-watch { left: 10px; bottom: 10px; padding: 8px 13px 8px 10px; font-size: 13px; }
  .ovf-close { top: -46px; }
}

@media (prefers-reduced-motion: reduce) {
  .ovf-watch { transition: none; }
}
