/* MovieLinkBD V78 — D-pad / TV remote navigation + focus visibility.
   Loaded site-wide; the JS only turns spatial navigation ON for TV/remote browsers
   (html.mlbd-dpad). Keyboard focus rings below also help desktop keyboard users. */

:root { --mlbd-focus: #22c7d9; }

/* Universal keyboard focus ring (desktop keyboard users, no effect for mouse). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--mlbd-focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- TV / D-pad mode: big, unmissable focus visible from across the room ---- */
html.mlbd-dpad :focus {
  outline: 4px solid var(--mlbd-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(34, 199, 217, .30),
              0 0 26px rgba(34, 199, 217, .55) !important;
  border-radius: 10px !important;
  /* Keep the focused item clear of sticky headers when scrolled into view. */
  scroll-margin: 140px 40px;
}

/* Poster / movie cards pop forward when focused so the selection reads instantly. */
html.mlbd-dpad a:focus img,
html.mlbd-dpad .movie-card:focus,
html.mlbd-dpad .movie-card-view:focus,
html.mlbd-dpad a:focus .image-container {
  transform: scale(1.05);
  transition: transform .12s ease;
}
html.mlbd-dpad a:focus,
html.mlbd-dpad .movie-card:focus {
  position: relative;
  z-index: 6;
}

/* Larger tap/hit feel and readable type at 10-foot distance on real TVs. */
@media (min-width: 1600px) {
  html.mlbd-dpad body { font-size: 18px; }
  html.mlbd-dpad .movie-card .title,
  html.mlbd-dpad .movie-card-view .title { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html.mlbd-dpad a:focus img,
  html.mlbd-dpad .movie-card:focus,
  html.mlbd-dpad .movie-card-view:focus,
  html.mlbd-dpad a:focus .image-container { transform: none; }
}
