/* =====================================================================
   Ratings from MDBList (includes/ratings.php, CLAUDE.md 5.53)
   .zf-ratings--full  title page: 4 scores on one line (IMDb, Rotten Tomatoes critics +
                      audience, Metacritic; Letterboxd/MAL/Trakt/TMDB only fill gaps)
   .zf-ratings--hero  homepage slides: up to 4 headline scores, compact
   .zf-card-imdb      one IMDb score on poster cards
   ===================================================================== */

.zf-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 0;
  list-style: none;
}
.zf-ratings li { margin: 0; padding: 0; }

.zf-rt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 13px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
  font: 800 15px/1 Inter, "Noto Sans Arabic", system-ui, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
[dir="rtl"] .zf-rt { padding: 6px 8px 6px 13px; }
a.zf-rt:hover,
a.zf-rt:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.08));
  outline: none;
}
a.zf-rt:focus-visible { box-shadow: 0 0 0 2px #fff, 0 8px 22px rgba(0, 0, 0, 0.3); }

/* icons: SVGs are square; the text marks (IMDb, TMDB, MAL, Metacritic) size to their text */
.zf-rt-ico { flex: none; height: 24px; min-width: 24px; display: inline-grid; place-items: center; }
svg.zf-rt-ico { display: block; width: 24px; }

.zf-rt-val {
  display: inline-flex;
  align-items: baseline;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.zf-rt-val small { margin-inline-start: 1px; font-size: 11px; font-weight: 700; opacity: 0.55; }

.zf-rt-sub {
  padding-inline-start: 9px;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.66);
  font-size: 11.5px;
  font-weight: 600;
}

/* brand marks drawn in CSS (no external images) */
.zf-rt-imdb-mark {
  height: 22px;
  min-width: 0;
  padding: 0 5px;
  border-radius: 5px;
  background: #f5c518;
  color: #000;
  font: 900 12px/22px Inter, Arial, sans-serif;
  letter-spacing: -0.03em;
}
.zf-rt-mc-box {
  min-width: 26px;
  height: 24px;
  padding: 0 4px;
  border-radius: 6px;
  color: #fff;
  font: 900 13px/24px Inter, Arial, sans-serif;
}
.zf-rt-mc-box.is-good { background: #00ce7a; }
.zf-rt-mc-box.is-mixed { background: #ffbd3f; color: #1a1300; }
.zf-rt-mc-box.is-bad { background: #ff6874; }
.zf-rt-tmdb-mark {
  min-width: 0;
  height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, #90cea1, #01b4e4);
  color: #0d253f;
  font: 900 10px/22px Inter, Arial, sans-serif;
}
.zf-rt-mal-mark {
  min-width: 0;
  height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  background: #2e51a2;
  color: #fff;
  font: 900 10px/22px Inter, Arial, sans-serif;
}

/* title page: 4 scores on one line (a narrow column hides the small labels first) */
.zf-ratings--full { flex-wrap: nowrap; max-width: 100%; }
.zf-ratings--full li { min-width: 0; }
@media (max-width: 1180px) and (min-width: 701px) {
  .zf-ratings--full .zf-rt-sub { display: none; }
  .zf-ratings--full .zf-rt--mc .zf-rt-sub { display: inline; }
}

/* homepage hero: compact, no sub labels */
.zf-ratings--hero { gap: 8px; margin: 12px 0 2px; }
.zf-ratings--hero .zf-rt {
  min-height: 34px;
  padding: 5px 11px 5px 6px;
  border-radius: 11px;
  font-size: 14px;
  gap: 7px;
}
[dir="rtl"] .zf-ratings--hero .zf-rt { padding: 5px 6px 5px 11px; }
/* 20 slides x 4 chips: only the slide on screen pays for the glass blur */
.zf-ratings--hero .zf-rt { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, rgba(40, 40, 46, 0.62), rgba(24, 24, 28, 0.55)); }
.billboard-slide.active .zf-ratings--hero .zf-rt { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05)); }
.zf-ratings--hero svg.zf-rt-ico { width: 21px; height: 21px; min-width: 21px; }
.zf-ratings--hero .zf-rt-imdb-mark { height: 20px; font-size: 11px; line-height: 20px; }
.zf-ratings--hero .zf-rt-mc-box { height: 21px; min-width: 24px; font-size: 12px; line-height: 21px; }
.zf-ratings--hero .zf-rt--mc { padding: 5px 6px; }

/* the slide's entry animation (zapflix-hero.css staggers children of .zf-hero-content) */
.billboard-slide.active .zf-ratings--hero { animation: zfRtIn 0.7s 0.32s both cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes zfRtIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .zf-ratings { gap: 7px; }
  .zf-rt { min-height: 34px; padding: 5px 10px 5px 6px; font-size: 13.5px; gap: 6px; border-radius: 11px; }
  [dir="rtl"] .zf-rt { padding: 5px 6px 5px 10px; }
  svg.zf-rt-ico { width: 20px; height: 20px; min-width: 20px; }
  .zf-rt-imdb-mark, .zf-rt-tmdb-mark, .zf-rt-mal-mark { height: 19px; line-height: 19px; }
  .zf-rt-imdb-mark { font-size: 10.5px; }
  .zf-rt-mc-box { height: 21px; min-width: 23px; font-size: 12px; line-height: 21px; }
  .zf-rt-sub { display: none; }
  .zf-ratings--hero { justify-content: center; }
  .zf-ratings--hero li:nth-child(n+4) { display: none; }
}

/* ---------------------------------------------------------- cards (IMDb only) */
.zf-card-imdb {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  direction: ltr;
  unicode-bidi: isolate;
  color: #fff !important;
  font-weight: 800;
}
.zf-card-imdb b {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  background: #f5c518;
  color: #000;
  font: 900 9.5px/1.35 Inter, Arial, sans-serif;
  letter-spacing: -0.02em;
}
.zf-cat-vote.zf-cat-imdb b { margin-inline-end: 3px; }
@media (prefers-reduced-motion: reduce) {
  .billboard-slide.active .zf-ratings--hero { animation: none; }
  a.zf-rt { transition: none; }
}
