/* extras.css — an Own App's extras (screens/watchlist/, screens/referrals/): the watchlist and its
 * button on film and series pages, My Requests and the Referrals page, in CSS pixels. Colours that
 * aren't the theme's are v3's: gold for tokens and promotions, a soft red for the notice, violet in
 * the store's card. */

/* ======================= sheets (USheet) whose buttons stay put while the rest scrolls ======================= */
.dialog.wl-sheet { max-width: 520px; }
.dialog.rq-sheet { max-width: 640px; }
.dialog.wl-sheet, .dialog.rq-sheet { max-height: 100%; display: flex; flex-direction: column; }
:root.lh-short .backdrop:has(> .wl-sheet, > .rq-sheet) { padding-top: 12px; padding-bottom: 12px; }
.xs-sheet { display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; }
.xs-scroll { min-height: 0; flex: 0 1 auto; }
.rq-sheet .xs-scroll { max-height: 520px; }
.wl-sheet .d-btns { margin-top: 18px; flex: none; }
.rq-sheet .d-btns { margin-top: 16px; flex: none; }

/* ======================= the watchlist ======================= */
.wl-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-top: 6px; padding-bottom: 14px; flex: none; }
.wl-body { flex: 1; min-height: 0; }
.wl-body > .state { min-height: 100%; }
.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--wl-pw, 134px) + 6px), 1fr)); gap: 22px 18px; padding: 8px 6px calc(var(--safe-bottom) + 32px); }
.wl-card { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.wl-art { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-high); }
.wl-art > .rimg { position: absolute; inset: 0; }
/* Not on the server: dimmed (lit while a finger's on it, as focus lit it on a TV), with a note along the bottom. */
.wl-dim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); transition: opacity 160ms; }
.wl-card.hot .wl-dim { opacity: 0; }
.wl-note { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 8px; background: rgba(0,0,0,0.72); color: #fff; text-align: center;
  font: 600 10px/13px var(--font); letter-spacing: 0.4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wl-tick { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; border-radius: 50%; background: var(--success); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.wl-title { margin-top: 7px; font: 500 13px/18px var(--font); color: var(--text); }
.wl-sub { font: 400 12px/16px var(--font); color: var(--text-2); }

/* a title the server hasn't got */
.wl-na { display: flex; gap: 16px; align-items: flex-start; }
.wl-na-art { position: relative; width: 96px; flex: none; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-high); }
.wl-na-art > .rimg { position: absolute; inset: 0; }
.wl-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); font: 600 12px/16px var(--font); }
.wl-na-text { margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ======================= My Requests ======================= */
.rq-wherebox { flex: none; padding-top: 6px; }
.rq-where { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.rq-where .t-callout { color: var(--text); }
.rq-where b { font-weight: 600; }
.rq-body { flex: 1; min-height: 0; margin-top: 12px; }
.rq-body > .state { min-height: 100%; }
.rq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 16px; padding: 4px 4px calc(var(--safe-bottom) + 32px); }
.rq-card { display: flex; align-items: flex-start; gap: 14px; min-height: 150px; padding: 14px; border-radius: 16px; background: var(--surface); text-align: left; min-width: 0; }
.rq-card.hot { background: var(--surface-high); }
.rq-art { position: relative; width: 84px; flex: none; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-high); }
.rq-art > .rimg, .rq-sh-art > .rimg { position: absolute; inset: 0; }
.rq-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rq-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rq-title { margin-top: 8px; }
.rq-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface-high); color: var(--text); font: 400 12px/16px var(--font); }
.rq-note .mi { color: var(--accent); margin-top: 1px; }
.rq-now { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--success); font: 600 13px/18px var(--font); }
/* the status, coloured as v3 does */
.rq-pill { display: inline-flex; padding: 3px 10px; border-radius: 99px; font: 600 11px/14px var(--font); letter-spacing: 0.4px; white-space: nowrap; flex: none; }
.rq-pill.done { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.rq-pill.refused { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.rq-pill.working { background: rgba(10,132,255,0.16); color: #3D9BFF; }
.rq-pill.waiting { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }

/* a request up close */
.rq-sh-top { display: flex; gap: 18px; align-items: flex-start; }
.rq-sh-art { position: relative; width: 120px; flex: none; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-high); }
:root.lh-short .rq-sh-art, :root.compact .rq-sh-art { width: 96px; }
.rq-sh-title { margin-top: 8px; }
.rq-sh-tagline { font-style: italic; }
.rq-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rq-chip { padding: 3px 9px; border-radius: 99px; background: var(--surface-high); color: var(--text-2); font: 400 12px/16px var(--font); white-space: nowrap; }
.rq-sh-overview { margin-top: 16px; }
.rq-notes { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--accent-soft); border: 0.6px solid rgba(var(--accent-rgb),0.35); }
.rq-notes-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: var(--accent); font: 600 12px/16px var(--font); }
.rq-comment { margin-top: 12px; }
.rq-label { margin-bottom: 3px; color: var(--text-2); font: 600 12px/16px var(--font); }
.rq-asked { margin-top: 12px; }

/* ======================= Referrals ======================= */
.rf-bar { flex: none; }
.rf-body { flex: 1; min-height: 0; }
.rf-body > .state { min-height: 100%; }
.rf-page { display: flex; flex-direction: column; gap: 12px; padding: 8px 4px calc(var(--safe-bottom) + 32px); }
.rf-card { position: relative; min-width: 0; padding: 18px; border-radius: 18px; background: var(--surface); border: 0.6px solid var(--separator); }

.rf-intro { display: flex; align-items: center; gap: 16px; background: linear-gradient(to bottom right, rgba(var(--accent-rgb),0.22), rgba(var(--accent-rgb),0.044)), var(--surface); }
.rf-intro-icon { width: 52px; height: 52px; border-radius: 15px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--accent-rgb),0.16); color: var(--accent); }
.rf-intro-text { margin-top: 3px; }

/* Referrals Made, Tokens Earned and the code: three across on wide screens, else two then the code. */
.rf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rf-stats .rf-code { grid-column: 1 / -1; }
.rf-stat { display: flex; flex-direction: column; justify-content: space-between; }
.rf-stat.lit { background: linear-gradient(to bottom right, rgba(var(--accent-rgb),0.18), rgba(var(--accent-rgb),0.036)), var(--surface); }
.rf-stat-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-high); color: var(--text-2); }
.rf-stat.lit .rf-stat-icon { background: rgba(var(--accent-rgb),0.16); color: var(--accent); }
.rf-stat-text { padding-top: 14px; min-width: 0; }
.rf-stat-value { white-space: nowrap; color: var(--text); }
.rf-stat.lit .rf-stat-value { color: var(--accent); }

.rf-code { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(to bottom right, rgba(var(--accent-rgb),0.14), rgba(var(--accent-rgb),0.028)), var(--surface); }
.rf-code > .ca { display: inline-flex; }
.rf-code-title { margin-top: 6px; }
/* the code on a dashed-edged ticket; it can be held to copy it by hand */
.rf-ticket { display: flex; justify-content: center; max-width: 100%; margin-top: 14px; padding: 10px 22px; border-radius: 12px; background: var(--surface-high); border: 1.5px dashed rgba(var(--accent-rgb),0.7); }
.rf-ticket-code { margin-right: -6px; font: 700 28px/34px ui-monospace, Menlo, monospace; letter-spacing: 6px; color: var(--accent); white-space: nowrap;
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.rf-copy { margin-top: 10px; }
.rf-nocode { margin-top: 14px; }
.rf-generate { margin-top: 10px; }
.rf-genfail { margin-top: 6px; }

.rf-store { display: flex; align-items: center; gap: 16px; background: linear-gradient(to bottom right, rgba(124,77,255,0.22), rgba(var(--accent-rgb),0.10)), var(--surface); }
.rf-store-icon { width: 46px; height: 46px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(to bottom right, #7C4DFF, var(--accent)); }
.rf-store-text { margin-top: 2px; }
.rf-store-text b { font-weight: 600; }

.rf-tip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(255,210,74,0.08); border: 0.6px solid rgba(255,210,74,0.3); color: #FFE08A; }
.rf-tip .mi { color: #FFD24A; }
:root[data-theme="light"] .rf-tip { background: rgba(255,210,74,0.18); color: var(--text); }
:root[data-theme="light"] .rf-tip .mi { color: var(--warning); }

/* How it works and the notice: side by side on wide screens */
.rf-pair { display: grid; grid-template-columns: 1fr; gap: 12px; }
.rf-section { display: flex; align-items: center; gap: 8px; }
.rf-section .t-headline { color: var(--text); }
.rf-red { color: #E57373; }
.rf-steps { margin-top: 12px; }
.rf-steps .divider { margin: 10px 0; }
.rf-step { display: flex; align-items: center; gap: 12px; }
.rf-step-icon { width: 34px; height: 34px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.rf-step.gold .rf-step-icon { background: rgba(255,210,74,0.16); color: #FFD24A; }
.rf-step.gold .rf-step-text { font-weight: 600; color: #FFE08A; }
:root[data-theme="light"] .rf-step.gold .rf-step-icon { color: var(--warning); }
:root[data-theme="light"] .rf-step.gold .rf-step-text { color: var(--text); }
.rf-notice { background: linear-gradient(to bottom right, rgba(229,115,115,0.08), rgba(229,115,115,0.03)), var(--surface); border-color: rgba(229,115,115,0.3); }
.rf-notice-p { margin-top: 8px; }
.rf-section + .rf-notice-p { margin-top: 10px; }

:root.lw-700 .rf-page { gap: 16px; }
:root.lw-700 .rf-stats { grid-template-columns: 1fr 1fr 1.5fr; gap: 16px; }
:root.lw-700 .rf-stats .rf-code { grid-column: auto; }
:root.lw-700 .rf-pair { grid-template-columns: 1fr 1fr; gap: 16px; }

/* Referral History: closed until opened */
.rf-hist { display: flex; flex-direction: column; gap: 8px; }
.rf-hist-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border-radius: 18px; background: var(--surface); text-align: left; }
.rf-hist-head.hot { background: var(--surface-high); }
.rf-hist-head > .ca, .rf-hist-arrow { display: inline-flex; }
.rf-hist-count { padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font: 800 11px/14px var(--font); letter-spacing: 0.4px; }
.rf-hist-list { padding: 8px; border-radius: 18px; background: var(--surface); border: 0.6px solid var(--separator); }
.rf-hist-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; }
.rf-hist-row > .c2 { display: inline-flex; }
.rf-hist-what { font-weight: 500; }
.rf-hist-div { margin: 0 12px; }
.rf-hist-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; text-align: center; }
