/* The Budget film, shared by the homepage and /budget: the thumbnail link and the player dialog.
   Loaded on both pages. Colours come from the site's tokens in main.css (--bd-ink, --bd-hair-cream, --red). */

/* ---------- The film dialog: square video on a black panel, a visible close control ---------- */
.film-dialog {
  margin: auto; width: min(720px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 0; background: transparent; color: #F7F4EC;
  overflow: visible;
}
.film-dialog::backdrop { background: rgba(10, 10, 10, .84); }
.film-dialog__panel { background: #0A0A0A; padding: 16px; box-shadow: 0 32px 64px rgba(0, 0, 0, .5); }
.film-dialog__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.film-dialog__title {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px); line-height: 1.3; color: #F7F4EC;
}
.film-dialog__close {
  flex: none; min-height: 44px; padding: 0 4px;
  border: 0; background: none; color: #F7F4EC; cursor: pointer;
  font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat;
  background-position: left bottom; background-size: 0% 1px; transition: background-size 200ms ease, color 200ms ease;
}
.film-dialog__close span { font-size: 18px; letter-spacing: 0; }
.film-dialog__close:hover, .film-dialog__close:focus-visible { background-size: 100% 1px; color: #E8646A; }
.film-dialog__close:focus-visible, .budget-lightbox__close:focus-visible { outline: 2px solid #E8646A; outline-offset: 4px; }
.film-dialog__media video { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #000; }

/* ---------- The homepage thumbnail link: one control, one tab stop; the poster is a thumbnail, not a panel ---------- */
.budget-film-link {
  display: inline-flex; align-items: center; gap: 16px; padding: 0;
  border: 0; background: none; color: var(--bd-ink); cursor: pointer; text-align: left;
  font: inherit;
}
.budget-film-link img { display: block; flex: none; width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--bd-hair-cream); background: #fff; }
.budget-film-link__label {
  font: 600 12px/1.5 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat;
  background-position: left bottom; background-size: 0% 1px; padding-bottom: 4px;
  transition: background-size 200ms ease, color 200ms ease;
}
.budget-film-link:hover .budget-film-link__label,
.budget-film-link:focus-visible .budget-film-link__label { background-size: 100% 1px; color: var(--red-deep); }
.budget-film-link:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }
/* one line on desktop; on phones the label wraps, with "film →" held together by a non-breaking space */
@media (min-width: 900px) { .budget-film-link__label { white-space: nowrap; } }
/* "Watch the film →" travels as one unit, so the arrow never drops onto a line of its own */
.budget-film-link__cta { white-space: nowrap; }
.budget-film-link .arr { display: inline-block; transition: transform 200ms ease; }
.budget-film-link:hover .arr { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
  .budget-film-link__label, .budget-film-link .arr, .film-dialog__close { transition: none !important; }
}
