/* FlickRatings — consolidated base styles
   Generated: 2026-01-04
   Notes:
   - Single source of truth for base.html + home.html + _title_cards.html + _title_list.html
   - Only two responsive breakpoints: <800px and ≥800px
*/

/* =========================
   TOKENS + RESET
   ========================= */
:root{
  --max: 1630px;
  --pad: 16px;
  --pad-m: 12px;

  --gutter: #0B1220;
  --bg: #ffffff;
  --soft: #f3f4f6;   /* light grey used for nav/filter cards */
  --soft-2: #f8fafc; /* subtle page fill */

  --ink: #0f172a;
  --muted: #6b7280;
  --accent: #ff1e00;

  --border: #e5e7eb;
  --border-2: #d1d5db;

  --radius: 14px;
  --radius-sm: 12px;

  --shadow: 0 10px 26px rgba(15,23,42,.08);
  --shadow-pop: 0 14px 32px rgba(15, 23, 42, 0.22);

  --ctl-h: 40px;
  --ctl-h-sm: 34px;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--gutter);
  color: var(--ink);
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}
img{ max-width:100%; height:auto; display:block; }
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }
button,input,select,textarea{ font: inherit; }

/* =========================
   SHELL + WRAPS
   ========================= */
.fr-shell{
  max-width: var(--max);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  box-shadow: var(--shadow);
}

.fr-wrap,
.wrap{
  padding-left: var(--pad);
  padding-right: var(--pad);
}

main .wrap{
  padding-top: 12px;
  padding-bottom: 20px;
}

/* =========================
   HEADER
   ========================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1200;
  background: var(--bg);
  border-bottom: 1px solid rgba(229,231,235,.75);
}

.header-bar{
  display:grid;
  grid-template-columns: 1fr minmax(260px, 520px) auto;
  align-items:center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 8px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}
.brand-home{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.fr-logo{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  display:grid;
  place-items:center;
  flex: 0 0 auto;
  box-shadow: 0 8px 18px rgba(255, 30, 0, 0.18);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .02em;
}
.brand-name{
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.powered{
  margin-top: 1px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.powered strong{ color: var(--accent); font-weight: 1000; }

.header-search{ min-width: 0; position: relative; }
.hs-ico{
  position:absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events:none;
}
.hs-input{
  width: 100%;
  height: var(--ctl-h);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 14px 0 38px;
  outline: none;
}
.hs-input:focus{
  border-color: rgba(255,30,0,.45);
  box-shadow: 0 0 0 4px rgba(255,30,0,.12);
}

/* Suggest panel populated via JS */
.hs-panel{
  position:absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 1500;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  padding: 6px;
}
.hs-panel[hidden]{ display:none !important; }
.hs-panel a{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration:none;
}
.hs-panel a:hover{ background: var(--soft-2); text-decoration:none; }
.hs-panel .sug-sub{ color: var(--muted); font-size: 12px; }

.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-hello{
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header .icon-btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(229,231,235,.9);
  background: #fff;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
  cursor: pointer;
  text-decoration:none;
  user-select:none;
}
.site-header .icon-btn:hover{ background: var(--soft-2); text-decoration:none; }
.site-header .icon-btn--primary{
  background: var(--accent);
  border-color: rgba(255,30,0,.55);
  color: #fff;
}
.site-header .icon-btn--primary:hover{ filter: brightness(1.02); }
.icon-btn .icon{
  width: 18px; height: 18px;
  display:grid; place-items:center;
}
.icon-btn .icon svg{ width: 18px; height: 18px; }


/* ===== Icon fonts (Font Awesome) support ===== */
.icon-btn .icon i{
  font-size: 18px;
  line-height: 1;
  display:block;
}
.icon-btn--google .icon i{
  color: #4285F4; /* Google-ish */
}

/* Screen-reader utility */
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* Filter-title icons */
.frBoxTitle{ display:flex; align-items:center; gap:8px; }
.frBoxTitleIcon{ display:inline-grid; place-items:center; width:16px; height:16px; color: var(--muted); }

.tagline{
  margin: 0;
  padding: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.35;
}
.tagline--mob{ display:none; }

/* =========================
   MODULE BAR
   ========================= */
.fr-modules{
  background: var(--bg);
  /* Removed: separator line between nav/modules and the filter box */
  border-bottom: 0;
}
.modbar{ padding: 10px 0 12px; }

/* Desktop-first: grid that wraps nicely */
.modgrid{
  display:grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* Card */
.modcard{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid rgba(209,213,219,.65);
  text-decoration:none;
  min-height: 52px;
}
.modcard:hover{ background: #eaecef; text-decoration:none; }

/* Active state (HTML uses modcard--active) */
.modcard.is-active,
.modcard--active{
  background: var(--accent);
  border-color: rgba(255,30,0,.65);
  color: #fff;
}

/* Icon (HTML uses .modico; legacy CSS used .modicon) */
.modico,
.modicon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(15,23,42,.06);
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}
.modcard.is-active .modico,
.modcard--active .modico,
.modcard.is-active .modicon,
.modcard--active .modicon{
  background: rgba(255,255,255,.18);
}

/* Text (HTML uses .modmeta/.moddek; legacy used .modtext/.moddesc) */
.modmeta,
.modtext{
  min-width: 0;
  display:flex;
  flex-direction: column;
}
.modtitle{
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  margin: 0;
}
.moddek,
.moddesc{
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;

  /* keep module cards short */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display:block;
}
.modcard.is-active .moddek,
.modcard--active .moddek,
.modcard.is-active .moddesc,
.modcard--active .moddesc{
  color: rgba(255,255,255,.82);
}

/* =========================
   BUTTONS + SEGMENT TOGGLES
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: #fff;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  text-decoration:none;
}
.btn:hover{ background: var(--soft-2); text-decoration:none; }
.btn.disabled{
  opacity: .55;
  pointer-events: none;
}
.btn.active{
  background: var(--accent);
  border-color: rgba(255,30,0,.6);
  color: #fff;
}
.btn--ghost{
  background: transparent;
  border-color: rgba(209,213,219,.9);
}

.seg-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 32px;
  min-width: 72px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,.85);
  background: #fff;
  font-weight: 1000;
  font-size: 12px;
  letter-spacing: .04em;
  text-decoration:none;
}
.seg-btn:hover{ background: var(--soft-2); text-decoration:none; }
.seg-btn.is-active{
  background: var(--ink);
  border-color: rgba(15,23,42,.75);
  color: #fff;
}

/* =========================
   FILTERS (HOME)
   ========================= */
.fr-search-section{ scroll-margin-top: 90px; }

.filters{
  width: 100%;
  background: var(--soft);
  border: 1px solid rgba(209,213,219,.7);
  border-radius: 18px;
  padding: 10px 12px;
}
.filters-stack{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.frFiltersLayout{
  display:grid;
  grid-template-columns: 7fr 13fr;
  gap: 12px;
  align-items:start;
}

.frLeftStack{
  display:flex;
  flex-direction: column;
  gap: 12px;
}

/* box */
.frBox{
  background: transparent;
  border: 0;
}
.frBoxTitle{
  font-weight: 1000;
  color: var(--ink);
  margin: 2px 0 8px;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  opacity: .85;
}
.frBoxTitle--row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.frBoxGrid{
  display:grid;
  gap: 10px;
}

/* Add breathing room between the two rows inside WATCH HERE
   (Region/Provider row vs. the 3-filter row).
   Keep this consistent with the Refine row spacing. */
.frBox--leftTop .frBoxGrid + .frBoxGrid{ margin-top: 14px; }
.frBoxGrid--2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.frBoxGrid--3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.frBoxGrid--3plusRefine{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* tiles */
.tile{ width:100%; }
.tile--flag .df-trigger{ padding-left: 42px; }

.dropdown-filter{
  position: relative;
  width: 100%;
}

.df-trigger{
  position: relative;
  width: 100%;
  height: var(--ctl-h);
  border-radius: 14px;
  border: 1px solid rgba(209,213,219,.9);
  background: #fff;
  padding: 0 34px 0 12px;
  display:flex;
  align-items:center;
  gap: 8px;
  font-weight: 900;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  text-align:left;
  user-select:none;
}
.df-trigger:hover{ background: var(--soft-2); }
.df-trigger:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(255,30,0,.12);
  border-color: rgba(255,30,0,.45);
}

/* chevron */
.df-trigger::after{
  content:"";
  position:absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  opacity: .75;
  background-repeat:no-repeat;
  background-position:center;
  background-size: 14px 14px;
  /* chevron-down */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5l5 5 5-5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.dropdown-filter.is-open .df-trigger::after,
.df-trigger[aria-expanded="true"]::after{
  transform: translateY(-50%) rotate(180deg);
}

/* label/value/count */
.df-label{
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .02em;
}
.df-value{
  font-weight: 1000;
}
.df-count{
  margin-left: auto;
  font-weight: 1000;
  color: var(--muted);
}

/* flag + provider images */
.ott-flag{
  width: 22px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}
.ott-provider-logo{
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
}
.df-trigger--flag .ott-flag{
  position:absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* panels */
.df-panel{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 1400;
  display:none;
  background: #fff;
  border: 1px solid rgba(209,213,219,.9);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  padding: 10px;
}
.dropdown-filter.is-open .df-panel{ display:block; }

.df-search{
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(209,213,219,.9);
  background: #fff;
  padding: 0 10px;
  margin-bottom: 10px;
}
.df-search:focus{
  outline:none;
  border-color: rgba(255,30,0,.45);
  box-shadow: 0 0 0 4px rgba(255,30,0,.10);
}

.df-list{
  max-height: 420px;
  overflow:auto;
  padding: 2px;
}
.df-item{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.df-item:hover{ background: var(--soft-2); }
.df-item input{ margin: 0 8px 0 0; }
.df-item span{ font-weight: 800; color: var(--ink); }

.df-opt{
  display:flex;
  align-items:center;
  gap: 10px;
}
.df-actions{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(229,231,235,.75);
  margin-top: 10px;
}
.df-btn{
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,.9);
  background: var(--soft);
  font-weight: 1000;
  font-size: 12px;
  cursor:pointer;
}
.df-btn:hover{ background: #eaecef; }

/* Refine trigger tile (mobile) */
.frTileRefine{ display:none; }
.frRefineTrigger{
  justify-content:center;
  gap: 8px;
}
.frRefIco{ font-size: 14px; }
.frRefTxt{ font-weight: 1000; }
.frRefCnt{
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 1000;
  line-height: 18px;
}

/* Refine right box */
#frRefineBox.frBox--right{
  background: transparent;
  border: 0;
}
.frRightGrid11{
  display:grid;
  /* Force 6 columns on row 1 and 5 on row 2 (11 total fields) */
  grid-template-columns: repeat(6, minmax(0, 1fr));
  /* More separation between row 1 and row 2 (match WATCH HERE spacing) */
  gap: 14px 10px;
}

.frRefineClose{
  display:none;
  height: 32px;
  width: 32px;
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,.85);
  background: #fff;
  cursor:pointer;
}

/* bottom bar: chips + reset */
.frBottomBar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}
.active-filters{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,.9);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor:pointer;
}
.filter-chip:hover{ background: var(--soft-2); }
.chip-group{ color: var(--muted); font-weight: 1000; }
.chip-text{ font-weight: 1000; }
.chip-x{
  display:inline-grid;
  place-items:center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  color: var(--muted);
  font-weight: 1000;
  cursor:pointer;
}
.chip-x:hover{ background: rgba(15,23,42,.10); }

/* results header */
.results-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 10px;
}
.result-meta{
  color: var(--muted);
  font-weight: 900;
}
.actions-right{
  display:flex;
  align-items:center;
  gap: 8px;
}

/* =========================
   RESULTS: GRID (TITLE CARDS)
   ========================= */
#results.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.title-card{
  display:grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(229,231,235,.85);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  position: relative;
}
#results.grid .title-card:hover{
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}
.title-card .poster{
  width: 108px;
  text-decoration:none;
}
.title-card .poster-img{
  width: 100%;
  height: 156px;
  object-fit: cover;
  border-radius: 14px;
  background: #0b1220;
}
.poster-fallback{
  width: 100%;
  height: 156px;
  border-radius: 14px;
  background: #0b1220;
  display:grid;
  place-items:center;
  padding: 10px;
}
.poster-fallback-text{
  text-align:center;
  font-weight: 900;
  color: rgba(255,255,255,.86);
  font-size: 12px;
  line-height: 1.25;
}

.title-card .meta{ min-width:0; }
.title-top{
  display:flex;
  align-items:center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.title-imdb-link{
  display:inline-flex;
  align-items:baseline;
  gap: 6px;
  text-decoration:none;
}
.title-imdb-link:hover{ text-decoration: underline; }
.title-name,
.tn-title{
  font-size: 14px;
  font-weight: 1000;
  line-height: 1.25;
}
.tn-year{ color: var(--muted); font-weight: 900; }
.aka{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* actions row */
.fr-actions{
  display:flex;
  align-items:center;
  flex-wrap: wrap;
  gap: 8px;
}

.fr-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 28px;
  min-width: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,.9);
  background: var(--soft);
  cursor:pointer;
  font-weight: 1000;
  font-size: 12px;
}
.fr-btn:hover{ background: #eaecef; }
.fr-btn.is-on{
  background: var(--accent);
  border-color: rgba(255,30,0,.6);
  color: #fff;
}
.fr-btn .icon{ font-weight: 1200; }

.rating-row{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}
.stars{
  display:inline-flex;
  gap: 2px;
  align-items:center;
}
.star{
  border: 0;
  background: transparent;
  cursor:pointer;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  color: rgba(15,23,42,.25);
}
.star.is-on{ color: #f59e0b; } /* warm gold */
.star:hover{ transform: translateY(-1px); }

.star-clear{
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  text-decoration: underline;
}

.info-tip{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(209,213,219,.9);
  background: #fff;
  cursor:pointer;
  font-weight: 1000;
  color: var(--muted);
  display:inline-grid;
  place-items:center;
}
.info-bubble{
  display:none;
  position:absolute;
  z-index: 10;
  left: 0;
  top: calc(100% + 8px);
  width: min(320px, 90vw);
  background: #fff;
  border: 1px solid rgba(209,213,219,.9);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-pop);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}
.rating-guide-tip:hover + .info-bubble,
.rating-guide-tip:focus-visible + .info-bubble{
  display:block;
}

/* meta bottom + details */
.title-card .meta-bottom{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.js-more{
  color: var(--muted);
  font-weight: 1000;
  /*text-decoration: underline;*/
}
.details{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(209,213,219,.9);
}
.details[hidden]{ display:none !important; }
.details .detail-row{
  display:flex;
  align-items:center;
  gap: 8px;
  line-height: 1.25;
  margin: 6px 0 0;
}
.details .detail-row b{
  min-width: 84px;
  color: var(--muted);
  font-weight: 1000;
}

/* icons */
.fr-meta-ico,
.fr-cell-ico{
  width: 16px;
  height: 16px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  display:inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.award-icon{
  height: 18px;
  width: auto;
  display:inline-block;
  vertical-align: -3px;
  margin-right: 6px;
}

/* =========================
   RESULTS: LIST (TABLE + MOBILE CARD)
   ========================= */
#results.list{ width: 100%; }

.fr-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(229,231,235,.85);
  border-radius: 18px;
  overflow: hidden;
}
.fr-table thead th{
  position: sticky;
  top: 0;
  background: var(--soft);
  color: var(--muted);
  font-weight: 1000;
  font-size: 12px;
  text-align:left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(209,213,219,.7);
}
.fr-table td{
  padding: 10px;
  border-bottom: 1px solid rgba(229,231,235,.75);
  vertical-align: top;
  font-size: 13px;
}
.fr-table tbody tr:last-child td{ border-bottom: 0; }

.list-title{
  display:grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items:start;
}
.fr-table .poster{
  width: 80px;
  height: 112px;
}
.fr-table .poster-img{
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 12px;
  background: #0b1220;
}
.fr-table .poster.no-img{ background: #020617; border-radius: 8px; }
.poster-fallback-list{
  width: 80px;
  height: 112px;
  background: #020617;
  border-radius: 12px;
}

/* list -> mobile transformer classes (JS) */
.fr-mobile-card{
  background: #fff;
  border: 1px solid rgba(229,231,235,.85);
  border-radius: 18px;
  padding: 12px;
}
.fr-m-head{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}
.fr-m-poster{ width: 92px; flex: 0 0 auto; }
.fr-m-meta{
  display:grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  margin: 10px 0 0;
  font-size: 12px;
}
.fr-m-meta dt{
  color: var(--muted);
  font-weight: 1000;
}
.fr-m-meta dd{
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}
.fr-m-rowfull{
  grid-column: 1 / -1;
}
.fr-m-titleline .title-top{ margin-bottom: 0; }
.fr-m-ratingline .fr-actions{ margin-top: 4px; }
.fr-m-plot{
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.35;
}

/* =========================
   OTT POP-OUT (GRID + LIST)
   ========================= */
.fr-ott-overlay[hidden]{ display:none; }
.fr-ott-overlay{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 3500;
  background: transparent;
}
.fr-ott-card{
  position: absolute;
  max-width: 760px;
  width: min(760px, calc(100vw - 80px));
  border-radius: 18px;
  padding: 14px 18px 18px;
  background: var(--soft);
  color: #111827;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-pop);
  font-size: 0.95rem;
  line-height: 1.5;
}
.fr-ott-heading{
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
}
.fr-ott-region-list{ list-style:none; margin:0; padding:0; }
.fr-ott-region-row{ margin: 4px 0; white-space: normal; }
.fr-ott-flag img{
  max-height: 16px;
  width: auto;
  display:inline-block;
  vertical-align: middle;
}
.fr-ott-flag{ margin-right: 6px; display:inline-block; }
.fr-ott-region-name{ font-weight: 900; margin-right: 4px; }
.fr-ott-region-providers a.fr-ott-provider{
  text-decoration: underline;
  font-weight: 800;
}
.fr-ott-close{
  position:absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor:pointer;
}
.fr-btn-ott{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: #e5e7eb;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .02em;
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
}
.fr-btn-ott:hover{ background: #d1d5db; }

/* =========================
   PAGINATION
   ========================= */
.pagination{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}
.pagination .gap{
  color: var(--muted);
  font-weight: 900;
  padding: 6px 8px;
}

/* =========================
   FOOTER
   ========================= */
.site-footer{
  border-top: 1px solid rgba(229,231,235,.75);
  background: var(--bg);
}
.site-footer .legalcopy{
  margin: 0;
  padding: 14px 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* =========================
   SELECT (generic) — nicer arrows
   ========================= */
select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

/* =========================
   RESPONSIVE (<800)
   ========================= */
@media (max-width: 799px){
  .fr-shell{
    width: calc(100% - 16px);
    margin: 0 auto;
    box-shadow: none;
  }
  .fr-wrap,
  .wrap{ padding-left: var(--pad-m); padding-right: var(--pad-m); }

  /* header becomes stacked */
  .header-bar{
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 6px;
  }
  .header-search{ order: 3; }
  .header-actions{
    order: 2;
    justify-content:flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
  }
  .header-actions::-webkit-scrollbar{ height: 0; }

  .site-header .icon-btn{
    padding: 0 10px;
    height: 32px;
  }
  .header-actions .icon-btn span:not(.icon){ display:none; }
  .auth-hello{ display:none; }

  /* brand: keep FR app icon + show "Presented by RRALists" */
  .brand{ flex-direction: column; align-items: flex-start; gap: 2px; }
  .brand-home{ width: 100%; }
  .powered{
    display:block;
    margin: 0;
    font-size: 11px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .fr-logo{ width: 34px; height: 34px; border-radius: 12px; font-size: 14px; }

  /* module bar: single-row scroll (more above-the-fold space) */
  .modbar{ padding: 6px 0 8px; }
  .modgrid{
    display:flex;
    gap: 8px;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .modgrid::-webkit-scrollbar{ height: 0; }

  .modcard{
    flex: 0 0 auto;
    width: 104px;
    padding: 8px 8px;
    min-height: 56px;
    border-radius: 16px;
    flex-direction: column;
    justify-content:center;
    text-align:center;
    gap: 6px;
  }
  .moddek, .moddesc{ display:none; }
  .modico, .modicon{ width: 30px; height: 30px; border-radius: 12px; font-size: 15px; }
  .modtitle{ font-size: 11px; }
  /* filters become single column + refine sheet */
  .filters{ padding: 8px 10px; border-radius: 16px; }
  .filters-stack{ gap: 8px; }
  .frLeftStack{ gap: 10px; }
  .frBoxGrid{ gap: 8px; }
  .frBoxTitle{ margin: 0 0 6px; font-size: 11px; }
  .frBox--leftTop .frBoxTitle{ display:none; }

  .frFiltersLayout{ grid-template-columns: 1fr; }
  .frBoxGrid--3plusRefine{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* show refine trigger, hide refine box until opened */
  .frTileRefine{ display:block; }
  #frRefineBox.frBox--right{
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 78vh;
    overflow: auto;
    background: var(--soft);
    border: 1px solid rgba(209,213,219,.8);
    border-radius: 20px;
    padding: 12px;
    box-shadow: var(--shadow-pop);
    transform: translateY(110%);
    transition: transform .18s ease;
    z-index: 3200;
  }
  #frRefineBox.frBox--right.is-open{ transform: translateY(0); }
  .frRefineClose{ display:inline-grid; place-items:center; }

  .frRightGrid11{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .frRefineScrim{
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.45);
    z-index: 3100;
  }

  /* mobile triggers: smaller */
  /* Left filter icons (mobile) */
  #df-ott-region .df-trigger::before,
  #df-ott-provider .df-trigger::before,
  #df-category .df-trigger::before,
  #df-toplist .df-trigger::before,
  #df-scope .df-trigger::before{
    position:absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    opacity: .92;
  }
  #df-category .df-trigger,
  #df-toplist .df-trigger,
  #df-scope .df-trigger{ padding-left: 34px; }

  /* Region: show globe only until a flag is visible, then flag-only */
  #df-ott-region .df-trigger::before{ content:"🌍"; }
  #df-ott-region .df-trigger:has(.ott-flag:not([style*="display:none"]))::before{ content:""; }
  #df-ott-region .df-trigger{ padding-left: 42px; }

  /* Provider: show TV icon only if logo missing */
  #df-ott-provider .df-trigger::before{ content:"📺"; }
  #df-ott-provider .df-trigger:has(.ott-provider-logo)::before{ content:""; }


  .df-trigger{
    height: var(--ctl-h-sm);
    border-radius: 12px;
    font-size: 12px;
    padding: 0 32px 0 10px;
  }
  /* icon injection: refine (right) via aria-controls */
  #frRefineBox .df-trigger::before{
    content:"•";
    position:absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    opacity: .9;
  }
  #frRefineBox .df-trigger{ padding-left: 34px; }
  #frRefineBox .df-trigger[aria-controls="df-panel-age-guide"]::before{ content:"👶"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-duration"]::before{ content:"⏱"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-genre"]::before{ content:"🎭"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-country"]::before{ content:"🗺"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-language"]::before{ content:"🗣"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-decade"]::before{ content:"🗓"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-year"]::before{ content:"📆"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-franchise"]::before{ content:"🧩"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-director"]::before{ content:"🎬"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-writer"]::before{ content:"✍️"; }
  #frRefineBox .df-trigger[aria-controls="df-panel-cast"]::before{ content:"👥"; }

  /* Hide refine trigger labels (icon-first) */
  #frRefineBox .df-trigger .df-label{ display:none; }
  #frRefineBox .df-trigger .df-count{
    margin-left: auto;
    font-size: 11px;
    font-weight: 1000;
  }

  /* Region trigger: flag-only (no country text) */
  #df-ott-region .df-trigger .df-label,
  #df-ott-region .df-trigger .df-value{ display:none; }

  /* Provider trigger: logo-only */
  #df-ott-provider .df-trigger .df-label,
  #df-ott-provider .df-trigger .df-value{ display:none; }

  /* Results grid: single column feel */
  #results.grid{ grid-template-columns: 1fr; }
  .title-card{ grid-template-columns: 98px 1fr; }
  .title-card .poster{ width: 98px; }
  .title-card .poster-img,
  .poster-fallback{ height: 144px; }


  /* Compact mobile filter row: 4 mini-buttons in one row */
  .frBoxGrid--3plusRefine{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* Icon-first triggers on mobile (Category / Top Lists / Your Lists / Refine) */
  .df-trigger--ico .df-ico{ display:inline-grid; place-items:center; width:18px; height:18px; }
  .df-trigger--ico .df-label{ display:none; }
  .df-trigger--ico .df-value{ font-size: 11px; font-weight: 800; max-width: 8ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .frRefineTrigger .frRefTxt{ display:none; }
  .frRefineTrigger .frRefIco{ font-size: 16px; }

  /* Box title: show icon only on mobile, keep text for screen readers */
  .frBoxTitleText{ position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }

}

/* =========================
   RESPONSIVE (≥800)
   ========================= */
@media (min-width: 800px){
  /* hide refine trigger (desktop has the right box visible) */
  .frTileRefine{ display:none; }

  /* visual separator between Watch Here (left) and Refine (right) */
  #frRefineBox.frBox--right{
    border-left: 1px solid rgba(209,213,219,.8);
    padding-left: 14px;
    margin-left: 2px;
  }
}

@media (max-width: 799px){
  /* Hide GRID/LIST toggle on mobile */
  .results-header .actions-right[aria-label="View"]{
    display: none !important;
  }
}


@media (max-width: 799px){

  /* Icon-row (Category / Top Lists / Your Lists / Refine) should hug the left */
  .frBoxGrid--3plusRefine{
    grid-template-columns: repeat(4, max-content) !important;
    justify-content: start !important;
    justify-items: start !important;
    column-gap: 10px;
  }

  .frBoxGrid--3plusRefine .tile{ width: auto !important; }

  /* Make the buttons compact but still tappable */
  .frBoxGrid--3plusRefine .df-trigger--ico{
    width: 56px;              /* tweak 52–64 if you want */
    padding: 0 30px 0 12px;   /* room for chevron on right */
    justify-content: flex-start;
  }
}
/* Provider logo: hidden by default, only show for Netflix */
.ott-provider-logo{ display:none !important; }
.ott-provider-logo.is-netflix{
  display:inline-block !important;
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-right: 8px;
  vertical-align: middle;
}

@media (max-width: 799px){
  .frBox--leftTop .frBoxGrid--3plusRefine{
    grid-template-columns: repeat(4, max-content) !important;
    justify-content: start !important;
    justify-items: start !important;
    margin-left: 0 !important;
  }
  .frBox--leftTop .frBoxGrid--3plusRefine .tile{ width:auto !important; }
}


.chip-x{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  line-height: 1 !important;
  font-size: 14px !important;
  padding: 0 !important;
}
.chip-x{ transform: translateY(-0.5px); } /* tiny visual centering for &times; */

@media (max-width: 799px){
  /* Force the icon-row to start from the left edge */
  .frBox--leftTop .frBoxGrid--3plusRefine{
    justify-content: flex-start !important;
    justify-items: flex-start !important;
    align-content: start !important;
  }

  /* Tiles must not stretch full width */
  .frBox--leftTop .frBoxGrid--3plusRefine .tile{
    width: auto !important;
  }

  /* Buttons: compact + left-aligned content */
  .frBox--leftTop .frBoxGrid--3plusRefine .df-trigger--ico{
    width: 54px;
    justify-content: flex-start;
    text-align: left;
    padding-left: 12px;     /* icon hugs left */
  }

  /* Give the icon a stable left position */
  .frBox--leftTop .frBoxGrid--3plusRefine .df-trigger--ico .df-ico{
    margin-right: 0;
  }
}

.df-item.df-hide { display: none !important; }


/* Mobile: icon-row (Category / Top Lists / Your Lists / Refine) — tighter + left-hugging */
@media (max-width: 799px){

  /* Keep the whole row hugging the left edge */
  .frBoxGrid--3plusRefine{
    grid-template-columns: repeat(4, 48px) !important; /* fixed compact buttons */
    justify-content: flex-start !important;
    justify-items: flex-start !important;
    column-gap: 8px !important;
  }

  .frBoxGrid--3plusRefine .tile{
    width: 48px !important;
  }

  /* Reduce the “wasted” padding so icons sit left, not floating */
  .frBoxGrid--3plusRefine .df-trigger--ico{
    width: 48px !important;
    padding: 0 22px 0 10px !important;  /* less right padding */
    justify-content: flex-start !important;
  }

  /* Pull the chevron closer so it doesn't force extra right padding */
  .frBoxGrid--3plusRefine .df-trigger--ico::after{
    right: 6px !important;
    width: 12px !important;
    height: 12px !important;
    background-size: 12px 12px !important;
    opacity: .7;
  }
}



/* If some JS adds .open, keep consistent scroll behavior */
.df-panel.open .df-list{ overflow:auto; }
.df-panel{ max-height: min(68vh, 520px); }


/* People-suggest rows: name left, count right (Duration-like cleanliness) */
.df-ps-opt{ display:flex; align-items:center; justify-content:space-between; width:100%; gap:10px; }
.df-ps-name{ font-weight:800; color:var(--ink); }
.df-ps-n{ color:var(--muted); font-weight:900; }
.df-ps-empty{ color:var(--muted); font-weight:800; }


/* =========================
   DROPDOWN PANEL: keep actions visible
   - Panel scrolls within viewport
   - Options list scrolls
   - Actions pinned at bottom
   ========================= */

/* Make the whole panel height-limited + column layout */
.df-panel{
  display:none; /* keep your existing open/close behavior */
  max-height: min(72vh, 520px);
  overflow: hidden;                 /* key: prevents actions from disappearing */
  padding: 10px;                    /* keep */
}

/* When open, switch to flex column so list can scroll and actions stay pinned */
.dropdown-filter.is-open .df-panel{
  display:flex;
  flex-direction: column;
}

/* Search stays fixed at top */
.df-search{ flex: 0 0 auto; }

/* List becomes the scroll container (this is what you want) */
.df-list{
  flex: 1 1 auto;
  overflow: auto;
  max-height: none;                 /* important: don't fight flex height */
  padding: 2px;
}

/* Actions pinned at bottom */
.df-actions{
  flex: 0 0 auto;
  margin-top: 10px;
  padding-top: 10px;
}

/* (Optional but nice) make actions sticky inside panel while list scrolls */
.df-actions{
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
}

.df-ps-search{
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(209,213,219,.9);
  padding: 0 10px;
  margin-bottom: 10px;
}
.df-ps-search:focus{
  outline:none;
  border-color: rgba(255,30,0,.45);
  box-shadow: 0 0 0 4px rgba(255,30,0,.10);
}


/* LIST: put everything under the TITLE column (not under poster) */
.fr-table .list-title{
  display: grid;
  grid-template-columns: 80px 1fr;  /* unchanged */
  grid-template-rows: auto auto;    /* add a 2nd row */
  gap: 10px;                        /* unchanged */
  align-items: start;
}

/* Poster stays left and spans both rows */
.fr-table .list-title .poster{
  grid-column: 1;
  grid-row: 1 / span 2;
}

/* Title stays top-right */
.fr-table .list-title .title-top{
  grid-column: 2;
  grid-row: 1;
}

/* Actions go UNDER the title (right column) */
.fr-table .list-title .fr-actions{
  grid-column: 2;
  grid-row: 2;
  margin-top: 8px;
}

/* LIST: tighten vertical spacing under the title (no width changes) */
.fr-table .list-title .title-top{
  margin-bottom: 8px;   /* was inheriting 8px */
}

.fr-table .list-title .fr-actions{
  margin-top: 2px;      /* was 8px in our last patch */
}



/* =========================
   FOOTER: legal/disclosures accordion
   ========================= */

.site-footer{
  border-top: 1px solid rgba(229,231,235,.75);
  background: var(--bg);
}

.site-footer .footer-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad) 18px;   /* aligns with shell wrap */
}

/* Card */
.footer-legal{
  background: var(--soft);
  border: 1px solid rgba(209,213,219,.75);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
  overflow: hidden;
}

/* Remove default marker + style summary */
.footer-legal > summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 1000;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(209,213,219,.65);
}
.footer-legal > summary::-webkit-details-marker{ display:none; }

/* Add our own chevron */
.footer-legal > summary::after{
  content:"";
  margin-left: auto;
  width: 14px;
  height: 14px;
  opacity: .75;
  background-repeat:no-repeat;
  background-position:center;
  background-size: 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5l5 5 5-5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: rotate(0deg);
  transition: transform .15s ease;
}
.footer-legal[open] > summary::after{
  transform: rotate(180deg);
}

.footer-legal > summary i{
  color: var(--muted);
  font-size: 14px;
}

/* Body */
.footer-disclaimer{
  padding: 12px 14px 14px;
  background: var(--bg);
}

.footer-disclaimer p{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  font-weight: 700;
  max-width: 1100px;   /* keeps it readable */
}
.footer-disclaimer p:last-child{ margin-bottom: 0; }

/* Mobile padding aligns with your mobile wrap */
@media (max-width: 799px){
  .site-footer .footer-inner{
    padding-left: var(--pad-m);
    padding-right: var(--pad-m);
  }
}

/* People-suggest: never ellipsis/truncate names */
.df-ps-opt, .df-ps-name{
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word !important;
}
.df-item{
  align-items: flex-start;
}

/* =========================
   HEADER (fix: move search left + better spacing)
   ========================= */

.header-bar{
  display: grid;
  /* brand (auto) | search (fixed-ish) | spacer (flex) */
  grid-template-columns: auto minmax(360px, 680px) 1fr;
  align-items: center;
  column-gap: 12px;
  padding-top: 8px;
  padding-bottom: 6px;
}

/* keep brand from stretching the row */
.brand{ min-width: 0; }

/* search now starts immediately after brand (left-aligned) */
.header-search{
  min-width: 0;
  justify-self: start;
}

/* actions go to the far right (using the 1fr spacer column) */
.header-actions{
  justify-self: end;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* optional: slightly tighter controls in header */
.hs-input{ height: 38px; }           /* was var(--ctl-h)=40px */
.site-header .icon-btn{ height: 34px; }           /* was 36px */

@media (max-width: 799px){
  .hs-input{ height: 34px; }
  .site-header .icon-btn{ height: 32px; }
}

/* =========================================================
   HEADER OVERRIDE (fix auth/dashboard weirdness)
   - Switch header row from GRID -> FLEX
   - Search hugs LEFT (right after brand)
   - Actions pinned RIGHT
   ========================================================= */

.site-header .header-bar{
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 6px;
}

/* Brand should never stretch */
.site-header .brand,
.site-header .brand-home{
  flex: 0 0 auto;
  min-width: 0;
}

/* Search sits immediately after brand, then creates the "spacer" to push actions right */
.site-header .header-search{
  flex: 0 1 620px;              /* responsive shrink allowed */
  width: min(620px, 100%);
  min-width: 260px;
  margin-left: 6px;
  margin-right: auto;           /* THIS is the key: pushes actions to the far right */
  justify-self: auto !important; /* neutralize grid leftovers */
}

/* Keep actions tight on one line (auth pages often have fewer buttons, so wrapping looks broken) */
.site-header .header-actions{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;            /* stop wrapping chaos */
  justify-self: auto !important;
}

/* Optional: prevent the hello text from bullying the header */
.site-header .auth-hello{
  max-width: 190px;
}

/* Mobile: stack brand/actions/search cleanly */
@media (max-width: 799px){
  .site-header .header-bar{
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .site-header .brand{ order: 1; }
  .site-header .header-actions{
    order: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .site-header .header-search{
    order: 3;
    margin-right: 0;
    width: 100%;
    min-width: 0;
  }
}


/* ================================
   People-suggest dropdown (remote)
   Fix: count wraps as "(2" + ")" and layout alignment
   ================================ */

.df-panel[data-remote="1"] .df-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Make each option a clean 3-column row: [checkbox] [name] [count] */
.df-panel[data-remote="1"] .df-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}

/* Checkbox alignment */
.df-panel[data-remote="1"] .df-item input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* The label wrapper */
.df-panel[data-remote="1"] .df-ps-opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0; /* critical for wrapping name without breaking count */
}

/* Name can wrap; do NOT truncate */
.df-panel[data-remote="1"] .df-ps-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Count must NEVER wrap into two lines */
.df-panel[data-remote="1"] .df-ps-n {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
  min-width: 4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Keep actions visible and not floating awkwardly */
/* Keep actions visible AND OPAQUE (fix list showing behind buttons) */
.df-panel[data-remote="1"] .df-actions{
  position: sticky;
  bottom: 0;
  z-index: 60;
  padding: 10px 10px;
  margin-top: 8px;
  background: #fff !important;       /* <-- key fix */
  opacity: 1 !important;
  background-clip: padding-box;
  border-top: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 -10px 18px rgba(0,0,0,0.12);
}


/* === Dropdown action buttons: left-aligned row (Select all / Apply / Clear) === */
.df-actions{
  display: flex;
  justify-content: flex-start;   /* <-- key */
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;              /* in case it gets tight */
}

/* If you previously pushed Clear to the right via auto margin, neutralize it */
.df-actions .df-clear{
  margin-left: 0 !important;
}

/* Optional: make buttons visually consistent */
.df-actions .df-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === Dropdown option density: reduce gaps between options === */
.df-panel .df-list{
  padding: 4px 0;            /* less top/bottom breathing room */
}

.df-panel .df-item{
  margin: 0;                 /* kill any extra margins */
}

.df-panel .df-item > span,
.df-panel .df-item .df-opt,
.df-panel .df-item .df-ps-opt{
  padding: 4px 5px;         /* <-- main control: reduce vertical gap */
  line-height: 1.15;         /* tighter text */
}

/* If labels are blocky/tall, this helps */
.df-panel .df-item span{
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Optional: make checkbox/radio not add weird vertical space */
.df-panel input[type="checkbox"],
.df-panel input[type="radio"]{
  margin-top: 0;
  margin-bottom: 0;
}

.df-item{
  display:flex;
  align-items:center;
  gap: 8px;              /* was 10 */
  padding: 5px 8px;      /* was 8px 10px */
  border-radius: 12px;
  cursor: pointer;
}
.df-opt{
  display:flex;
  align-items:center;
  gap: 6px;              /* was 10 */
}
.df-panel[data-remote="1"] .df-list {
  display: flex;
  flex-direction: column;
  gap: 4px;              /* was 6 */
}
.df-list{ padding: 0 !important; }

.df-item{
  padding: 5px 8px !important;
  gap: 8px !important;
}

.df-opt{ gap: 6px !important; }

.df-panel[data-remote="1"] .df-list{ gap: 4px !important; }
.df-panel[data-remote="1"] .df-item{ padding: 5px 8px !important; }
/* Leave space for sticky footer so options don't sit behind it */
.df-panel .df-list{ padding-bottom: 64px !important; }


/* =====================================================
   OPAQUE sticky action bar for ALL dropdown panels
   Fix: options showing behind Select all / Apply / Clear
   ===================================================== */

.df-panel .df-actions{
  position: sticky !important;
  bottom: 0 !important;
  z-index: 9999 !important;

  /* Make the footer fully opaque */
  background: #ffffff !important;
  opacity: 1 !important;

  /* Make sure it visually covers content beneath */
  padding: 10px 10px !important;
  margin-top: 8px !important;

  border-top: 1px solid rgba(0,0,0,0.10) !important;
  box-shadow: 0 -10px 18px rgba(0,0,0,0.12) !important;

  /* Create its own stacking context */
  isolation: isolate;
}

/* “Belt + suspenders”: force an opaque layer even if some theme tries to override */
.df-panel .df-actions::before{
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  z-index: -1;
}

/* Leave space so the last options don’t sit under the sticky footer */
.df-panel .df-list{
  padding-bottom: 78px !important;
}

/* ===== CLS killer: reserve poster space ===== */
.title-card .poster{
  display:block;
  width:100%;
  aspect-ratio: 2 / 3;
  background: rgba(15,23,42,.06);
  border-radius: 12px;
  overflow: hidden;
}

.title-card .poster-img,
.title-card .poster-fallback{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
}

/* List/table posters also need fixed geometry */
.fr-table .poster{
  width: 56px;            /* tune to taste */
  aspect-ratio: 2 / 3;
  background: rgba(15,23,42,.06);
  border-radius: 8px;
  overflow:hidden;
}
.fr-table .poster img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Reserve space in filter trigger buttons, but hide image visually until set */
#df-ott-region .ott-flag{
  width:20px; height:14px;
  object-fit:cover;
  border-radius:3px;
  visibility:hidden;      /* reserves space */
}
#df-ott-region .ott-flag.is-on{ visibility:visible; }

#df-ott-provider .ott-provider-logo{
  width:22px; height:22px;
  object-fit:contain;
  visibility:hidden;
}
#df-ott-provider .ott-provider-logo.is-on{ visibility:visible; }
