/* james.com redesign - the music videos page (css/ss-pages/videos.css).
   Loaded only by /music-videos in the Safety design (INFO["ss_css"] = "videos"), after safety-site.css.
   Extends the core video components (ss-frame, ss-play, ss-controls, ss-range, ss-video-grid, ss-video-card)
   with new ss-v* classes only. The classic page's hoisted cpp_head CSS still reaches this page
   (video::-webkit-media-controls, video, #video-element ...): the rules below neutralise what touches our player. */

/* moved from the core (css/ss-pages/safety-site.css) by RD/tools/css_split.py, review 2026-10-05:
   the rules below are used only by the pages that load this partial; they keep their core order */
.ss-play {
  position: absolute;
  z-index: 2;
  left: 50%; top: 50%;
  width: clamp(72px, 9vw, 104px);
  height: clamp(72px, 9vw, 104px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 11, 23, 0.35);
  border: 1.5px solid rgba(243, 233, 210, 0.8);
  color: var(--ss-cream);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 10px rgba(243, 233, 210, 0.06), 0 0 60px rgba(242, 201, 135, 0.35);
  transition: transform 0.4s var(--ss-ease-out), background-color 0.3s, color 0.3s;
}
.ss-play .ss-ico { width: 32%; height: 32%; } /* the sprite's play is already optically centred (fix-1005) */
.ss-frame:hover .ss-play { transform: translate(-50%, -50%) scale(1.08); background: rgba(224, 164, 88, 0.88); color: var(--ss-navy); }
.ss-controls {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 14px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75));
  transition: opacity 0.4s;
}
.ss-frame.is-idle .ss-controls { opacity: 0; }
.ss-controls .ss-btn-icon { width: 40px; height: 40px; background: rgba(6, 11, 23, 0.5); }
.ss-time { color: var(--ss-cream); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ss-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 60px;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.ss-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ss-amber) var(--ss-fill, 0%), rgba(243, 233, 210, 0.25) var(--ss-fill, 0%)); }
.ss-range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(243, 233, 210, 0.25); }
.ss-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ss-amber); }
.ss-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--ss-amber-hi); box-shadow: 0 0 0 4px rgba(242, 201, 135, 0.2); }
.ss-range::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ss-amber-hi); }
.ss-range-vol { flex: 0 0 80px; }
@media (hover: none) {
  .ss-range-vol { display: none; }
}
.ss-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.ss-video-card {
  display: block;
  width: 100%;
  padding: 0 0 14px;
  border: 1px solid var(--ss-line-2);
  border-left: 2px solid transparent;
  border-radius: var(--ss-radius);
  background: rgba(16, 27, 51, 0.5);
  color: var(--ss-ink);
  text-align: left;
  overflow: hidden;
  transition: transform 0.4s var(--ss-ease-out), border-color 0.3s;
}
.ss-video-card:hover { transform: translateY(-3px); border-color: rgba(242, 201, 135, 0.3); }
a.ss-video-card { text-decoration: none; }
.ss-video-card .ss-thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--ss-navy-2); }
.ss-video-card .ss-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ss-video-card .ss-thumb .ss-ico { position: absolute; left: 12px; bottom: 12px; width: 28px; height: 28px; padding: 7px; border-radius: 50%; background: rgba(6, 11, 23, 0.6); color: var(--ss-cream); }
.ss-video-card b { display: block; margin: 12px 16px 0; font-family: var(--ss-serif); font-size: 21px; font-weight: 600; line-height: 1.15; color: var(--ss-cream); }
.ss-video-card small { display: block; margin: 2px 16px 0; color: var(--ss-muted-2); font-size: 12.5px; }
.ss-video-card[aria-current="true"] { border-left-color: var(--ss-amber); }
.ss-now { display: none; margin: 8px 16px 0; }
.ss-video-card[aria-current="true"] .ss-now { display: inline-flex; }
/* end of the rules moved from the core */

/* ---------- a compact page head: the player starts high on the page (mockup 05) ---------- */
.ss-pagehead.ss-vhead { padding-top: calc(var(--ss-topbar-h) + clamp(28px, 5vw, 64px)); padding-bottom: clamp(6px, 1.5vw, 16px); }
.ss-vhead .ss-display { font-size: clamp(40px, 5.4vw, 74px); }
.ss-vhead .ss-lede { margin-top: 12px; font-size: clamp(18px, 1.7vw, 22px); }
.ss-section-tight.ss-vids { padding-top: clamp(14px, 2.4vw, 30px); }

/* ---------- the player frame ---------- */
.ss-vplayer { isolation: isolate; }
.ss-vplayer > video.ss-video { z-index: 0; display: block; border-radius: 0; object-fit: contain; cursor: pointer; }
/* without JavaScript the native controls must work: undo the classic page's hoisted "display: none !important" */
html:not(.ss-js) .ss-vplayer > video.ss-video::-webkit-media-controls { display: flex !important; }
.ss-vplayer > img.ss-vposter { z-index: 1; pointer-events: none; }
.ss-vplayer.is-started > img.ss-vposter { opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0s linear 0.5s; }
.ss-vplayer .ss-play { cursor: pointer; transition: transform 0.4s var(--ss-ease-out), background-color 0.3s, color 0.3s, opacity 0.3s; }
.ss-vplayer.is-playing .ss-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.9); }
.ss-vplayer:not(.is-started) .ss-controls { display: none; }
.ss-vplayer.is-idle { cursor: none; }
.ss-vplayer.is-idle > video.ss-video { cursor: none; }
.ss-vplayer.is-loading .ss-play::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(242, 201, 135, 0.2);
  border-top-color: var(--ss-amber-hi);
  animation: ss-spin 0.9s linear infinite;
}
/* video-lag2-1009: the loading ring lived inside the round play button, which hides the moment play is pressed, so a
   start, a seek or a stall showed nothing moving. While a started video waits for its picture the frame itself now
   shows the same ring in the middle (the button fades away as before, without its own ring); it fades in after
   0.15 s, so a quick start or stall never flashes it, and it spins only while it shows */
.ss-vplayer.is-playing .ss-play::after { display: none; }
.ss-vplayer::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  box-sizing: border-box;
  width: calc(clamp(72px, 9vw, 104px) + 16px);
  height: calc(clamp(72px, 9vw, 104px) + 16px);
  margin: calc((clamp(72px, 9vw, 104px) + 16px) / -2) 0 0 calc((clamp(72px, 9vw, 104px) + 16px) / -2);
  border-radius: 50%;
  border: 2px solid rgba(242, 201, 135, 0.2);
  border-top-color: var(--ss-amber-hi);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s linear, visibility 0s linear 0.2s;
}
.ss-vplayer.is-playing.is-loading::after {
  opacity: 1;
  visibility: visible;
  animation: ss-spin 0.9s linear infinite;
  transition: opacity 0.2s linear 0.15s, visibility 0s linear 0.15s;
}
@media (max-width: 520px) {
  .ss-vplayer::after { width: 80px; height: 80px; margin: -40px 0 0 -40px; }
}
.ss-vplayer:fullscreen { border-radius: 0; border: 0; }
.ss-vplayer:-webkit-full-screen { border-radius: 0; border: 0; }

/* controls bar */
.ss-vplayer .ss-controls { gap: 8px; }
.ss-vplayer .ss-controls .ss-btn-icon .ss-ico { width: 18px; height: 18px; }
.ss-vplayer .ss-controls .ss-btn-icon:hover { background: var(--ss-cream); color: var(--ss-navy); }
.ss-vplayer [data-ico="pause"], .ss-vplayer.is-playing [data-ico="play"] { display: none; }
.ss-vplayer.is-playing [data-ico="pause"] { display: inline-block; }
.ss-vplayer [data-ico="mute"], .ss-vplayer.is-muted [data-ico="volume"] { display: none; }
.ss-vplayer.is-muted [data-ico="mute"] { display: inline-block; }
.ss-vscrub { position: relative; flex: 1 1 auto; min-width: 60px; display: flex; align-items: center; }
.ss-vscrub .ss-range { width: 100%; }
.ss-vplayer .ss-time { min-width: 7.6em; text-align: center; }

/* hover thumbnail preview (fine pointers only; the script never builds it on touch) */
.ss-vpeek {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: 192px;
  margin-left: -96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(243, 233, 210, 0.22);
  background: var(--ss-navy-0);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9), 0 0 30px -12px rgba(224, 164, 88, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.ss-vpeek.is-on { opacity: 1; }
.ss-vpeek-img { position: relative; aspect-ratio: 16 / 9; background: var(--ss-navy-2); }
.ss-vpeek-img img, .ss-vpeek-img canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-vpeek-t { display: block; padding: 4px 0 5px; text-align: center; color: var(--ss-cream); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .ss-vplayer .ss-controls { gap: 4px; padding: 26px 8px 8px; }
  .ss-vplayer .ss-controls .ss-btn-icon { width: 36px; height: 36px; }
  .ss-vplayer .ss-time { min-width: 0; font-size: 12px; }
  .ss-vplayer .ss-play { width: 64px; height: 64px; }
}
/* bg-play-1007: the Picture-in-Picture button (js/safety-site-player.js adds it where the browser has PiP). The clock
   and the buttons never shrink (no clipped text, full tap targets: the seek bar takes the rest); the narrowest phones
   keep three buttons and use the system player's PiP */
.ss-vplayer .ss-time, .ss-vplayer .ss-controls .ss-btn-icon { flex-shrink: 0; }
@media (max-width: 359px) {
  .ss-vplayer [data-k="pip"] { display: none; }
}

/* ---------- title row under the player ---------- */
.ss-vinfo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-top: clamp(20px, 3vw, 32px); }
.ss-vinfo-text { min-width: 0; }
.ss-vinfo .ss-vtitle { margin: 0; }
.ss-vinfo .ss-meta { margin: 8px 0 0; }
.ss-vinfo .ss-btn .ss-ico { width: 16px; height: 16px; }
.ss-vinfo .ss-btn-outline .ss-ico { margin-left: 2px; }

/* ---------- playlist ---------- */
.ss-vgrid { margin-top: 4px; }
a.ss-vcard { text-decoration: none; color: var(--ss-ink); }
a.ss-vcard:hover { color: var(--ss-ink); }
.ss-vcard-thumb { display: block; overflow: hidden; }
.ss-vcard-thumb img { transition: transform 1.2s var(--ss-ease-out), filter 0.6s; filter: saturate(0.92) brightness(0.9); }
.ss-vcard:hover .ss-vcard-thumb img { transform: scale(1.05); filter: saturate(1.05) brightness(1); }
.ss-vcard .ss-vcard-thumb .ss-ico { transition: background-color 0.3s, color 0.3s; }
.ss-vcard:hover .ss-vcard-thumb .ss-ico, .ss-vcard[aria-current="true"] .ss-vcard-thumb .ss-ico { background: var(--ss-amber); color: var(--ss-navy); }
.ss-vcard[aria-current="true"] { box-shadow: 0 24px 60px -34px rgba(224, 164, 88, 0.55); }
@media (max-width: 520px) {
  /* phones: two columns of smaller cards, so 20 videos stay a short scroll */
  .ss-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ss-vgrid .ss-vcard { padding-bottom: 10px; }
  .ss-vgrid .ss-vcard b { margin: 9px 10px 0; font-size: 17px; }
  .ss-vgrid .ss-vcard small { margin: 2px 10px 0; font-size: 12px; }
  .ss-vgrid .ss-vcard .ss-now { margin: 6px 10px 0; padding: 3px 9px; font-size: 11px; }
  .ss-vgrid .ss-vcard-thumb .ss-ico { left: 8px; bottom: 8px; width: 24px; height: 24px; padding: 6px; }
}
.ss-vempty-row { justify-content: center; margin-top: 18px; }
.ss-vempty-row .ss-ico { width: 16px; height: 16px; }

/* videos-1006: the page-wide film grain (.ss-grain, z-index 60, above the content) is not drawn over a started
   video while the player is on screen (js/safety-site-player.js sets body.ss-vwatch); the rest of the time the
   grain shows as everywhere else on the site */
.ss-grain { transition: opacity 0.4s ease, visibility 0s linear 0s; }
body.ss-vwatch .ss-grain { opacity: 0; visibility: hidden; animation-play-state: paused; transition: opacity 0.4s ease, visibility 0s linear 0.4s; }
/* videos-hls-1006: the same class pauses the night-sky drift and the fog band behind the page while a video
   plays on screen, so a phone draws only the video (they go on from where they stopped afterwards) */
body.ss-vwatch .ss-nl-in, body.ss-vwatch .ss-fogband { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .ss-grain, body.ss-vwatch .ss-grain { transition: none; }
  .ss-vplayer .ss-play, .ss-vpeek, .ss-vcard-thumb img, .ss-vplayer.is-started > img.ss-vposter { transition: none; }
  .ss-vplayer.is-loading .ss-play::after, .ss-vplayer.is-playing.is-loading::after { animation: none; }
  .ss-vcard:hover .ss-vcard-thumb img { transform: none; }
}
@media print {
  .ss-vplayer .ss-controls, .ss-vpeek { display: none; }
}

/* ---------- album trailers (trailers-1007) ----------
   The "Album trailers" section (views/music-videos.nvx): the same cards as the playlist, each with a link to its
   album under it; a trailer whose files are not here yet links to YouTube (.ss-tcard-yt, YouTube mark). */
.ss-tcard { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ss-tcard > .ss-vcard { flex: 1 1 auto; }
.ss-tcard-album { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; color: #cdd3df; font-size: 13px; text-decoration: none; }
.ss-tcard-album:hover, .ss-tcard-album:focus-visible { color: var(--ss-amber-hi); }
.ss-tcard-album .ss-ico { width: 14px; height: 14px; }
