/* VidNest – components.css: shared pieces the approved screens imply but do not draw (foundation). Tokens only – no
   hex colours, no glass. Loaded on every page after base.css.
   Flash messages (.flash), toasts (.toast), dropdowns (details.dd > summary + .ddm – the bell and the account menu),
   notification list (.npop .nrow), form errors (.err, .inp.is-bad), modal dialogs (dialog.mdl – the design's own
   bottom sheets are div.dlg in base.css), the demo ribbon, cookie notice, skip link, simple CMS text (.cms), pager,
   copy fields, the video player shell (.vplayer – MediaUrls sources, assets/js/player.js). */

/* names used by shared components, mapped onto the design's tokens */
:root{--red:var(--bad);--red-soft:var(--bad-soft);--green:var(--ok);--green-soft:var(--ok-soft);--amber:var(--warn);--amber-soft:var(--warn-soft);
  --shadow-sm:var(--sh-1);--shadow:var(--sh-2);--shadow-lift:var(--sh-3);--r-md:var(--r-sm);--r-lg:20px;--hover:var(--surface-2);--hdr-bg:var(--surface);
  --ring:0 0 0 4px var(--primary-soft);--scrim:rgba(9,14,28,.62);--on-ink:#FFFFFF;--on-ink-2:#C5CEDF;--primary-hover:var(--primary-h);--accent-hover:var(--accent-h);
  --primary-line:var(--line-3);--track:var(--surface-3);--ease:cubic-bezier(.2,.7,.2,1)}

.skiplink{position:absolute;left:-9999px;top:8px;z-index:200;padding:10px 14px;border-radius:10px;background:var(--surface);color:var(--text);box-shadow:var(--shadow-lift)}
.skiplink:focus{left:12px}
.demo-ribbon{display:flex;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:6px 16px;background:var(--ink);color:var(--on-ink-2);font:500 13px/1.3 var(--font);text-align:center}
.demo-ribbon b{color:var(--on-ink)}

/* flash messages */
.flash{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:var(--r-md);margin:16px 0 0;font-size:14.5px;border:1px solid transparent}
.flash .ic{flex:none;margin-top:1px}
.flash.ok{background:var(--green-soft);color:var(--green)}
.flash.bad{background:var(--red-soft);color:var(--red)}
.flash.info{background:var(--primary-soft);color:var(--primary-text);border-color:var(--primary-line)}
.flash ul{margin:4px 0 0;padding-left:18px}
.flash .x{margin-left:auto;color:inherit;opacity:.7;flex:none}

/* toasts (VN.toast) */
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;z-index:300;max-width:calc(100vw - 32px);padding:12px 16px;border-radius:12px;background:var(--ink);color:var(--on-ink);font:500 14px/1.4 var(--font);box-shadow:var(--shadow-lift);transition:opacity .25s,transform .25s var(--ease);pointer-events:none}
.toast.show{opacity:1;transform:translate(-50%,0)}
body.has-tabs .toast{bottom:88px}

/* dropdowns: bell, account menu, row menus */
details.dd{position:relative}
details.dd>summary{list-style:none;cursor:pointer}
details.dd>summary::-webkit-details-marker{display:none}
.ddm{position:absolute;right:0;top:calc(100% + 8px);min-width:240px;max-width:min(360px,calc(100vw - 24px));background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lift);padding:8px;z-index:70}
.ddm .hd{padding:8px 10px 10px;border-bottom:1px solid var(--line);margin-bottom:6px;font-size:13px;color:var(--text-3);overflow-wrap:anywhere}
.ddm a,.ddm button{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:0 10px;border-radius:9px;font:500 14.5px/1.2 var(--font);color:var(--text-2);text-align:left}
.ddm a:hover,.ddm button:hover{background:var(--hover);color:var(--text)}
.ddm .ic{width:18px;height:18px;flex:none}
.ddm hr{border:0;height:1px;background:var(--line);margin:6px 4px}
.ddm form{margin:0}
.ddm .danger{color:var(--red)}
.npop{width:340px}
.nrow{display:flex!important;align-items:flex-start!important;gap:10px;padding:10px!important;min-height:0!important}
.nrow .grow{min-width:0;flex:1}
.nrow b{display:block;font-size:14px;color:var(--text)}
.nrow small{display:block;font-size:12.5px;color:var(--text-3);line-height:1.4}
.nrow.unread b::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent);margin-right:6px;vertical-align:middle}
.ndot{position:absolute;top:9px;right:9px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--hdr-bg)}

/* forms */
.err{display:block;font-size:12.5px;color:var(--red);margin-top:2px}
.inp.is-bad,.slc.is-bad,.ta.is-bad{border-color:var(--red)}
.form-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px}
label.chk{display:flex;align-items:center;gap:10px;font-size:14.5px;cursor:pointer}
label.chk input{width:18px;height:18px;accent-color:var(--primary)}
button.sw{cursor:pointer}
.copyline{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 6px 6px 12px;border-radius:var(--r);border:1px solid var(--line-2);background:var(--surface-2)}
.copyline code,.copyline span{flex:1;min-width:0;overflow-wrap:anywhere;font:500 13px/1.4 var(--mono);color:var(--text-2)}

/* dialogs */
dialog.mdl{border:0;padding:0;border-radius:var(--r-lg);background:var(--surface);color:var(--text);box-shadow:var(--shadow-lift);width:min(520px,calc(100vw - 24px));max-height:calc(100vh - 40px)}
dialog.mdl::backdrop{background:var(--scrim)}
dialog.mdl .hd{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}
dialog.mdl .hd h3{font-size:17px}
dialog.mdl .bd{padding:20px;overflow:auto}
dialog.mdl .ft{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;padding:14px 20px;border-top:1px solid var(--line)}

/* cookie notice */
.cookie{position:fixed;left:16px;right:16px;bottom:16px;z-index:90;max-width:560px;margin:0 auto;display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 16px;border-radius:var(--r-md);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-lift);font-size:14px;color:var(--text-2)}
.cookie p{flex:1 1 240px;margin:0}
body.has-tabs .cookie{bottom:80px}

/* CMS text (legal pages, help) */
.cms{max-width:760px;font-size:16px;line-height:1.7;color:var(--text-2)}
.cms h2{font-size:22px;margin:28px 0 10px;color:var(--text)}
.cms h3{font-size:18px;margin:22px 0 8px;color:var(--text)}
.cms p,.cms ul,.cms ol{margin:0 0 14px}
.cms a{color:var(--primary-text);text-decoration:underline}

/* placeholder pages (until a builder replaces them) */
.stand-in{padding:72px 0}

@media (max-width:760px){
  .ddm{position:fixed;left:12px;right:12px;top:66px;max-width:none;min-width:0}
  .npop{width:auto}
}

/* uploaded logos (Settings › Branding) */
.logo-img{height:34px;width:auto;max-width:200px;object-fit:contain}
.logo .mk img{width:100%;height:100%;object-fit:contain}
.dk-only{display:none}
[data-theme="dark"] .lt-only{display:none}[data-theme="dark"] .dk-only{display:block}
.delta.dn{color:var(--red)}
.menu form{margin:0}
.menu .mlink{display:flex;align-items:center;gap:10px;width:100%;height:42px;padding:0 12px;border-radius:9px;font:500 14.5px/1 var(--font);color:var(--text-2);text-align:left}
.menu .mlink:hover{background:var(--hover);color:var(--text)}

/* a checkbox drawn as the design's switch (settings forms) */
input.sw{appearance:none;-webkit-appearance:none;margin:0;cursor:pointer;border:0}
input.sw:checked{background:var(--primary)}
input.sw:checked::after{transform:translateX(18px)}
input.sw:focus-visible{outline:0;box-shadow:var(--ring)}

/* ---------- member notifications page (/notifications) ---------- */
.nl-wrap{max-width:860px}
.nl-seg{margin-bottom:14px}
.nl-seg a{height:34px;padding:0 14px;border-radius:8px;font:600 13.5px/34px var(--font);color:var(--text-2);white-space:nowrap}
.nl-seg a.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}
.nlist{overflow:hidden}
.nlist .nitem{display:flex;align-items:flex-start;gap:14px;padding:16px 20px;border-top:1px solid var(--line);color:var(--text);text-decoration:none;transition:background .2s}
.nlist .nitem:first-child{border-top:0}
.nlist .nitem:hover{background:var(--surface-2)}
.nlist .nitem.unread{background:var(--primary-soft)}
.nlist .nitem .ki{flex:none;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary-text)}
.nlist .nitem.unread .ki{background:var(--surface)}
.nlist .nitem .ki .ic{width:18px;height:18px}
.nlist .nitem .grow{flex:1;min-width:0}
.nlist .nitem b{display:block;font-size:15px;overflow-wrap:anywhere}
.nlist .nitem .tx{display:block;color:var(--text-2);font-size:14px;margin-top:3px;overflow-wrap:anywhere}
.nlist .nitem small{display:block;color:var(--text-3);font-size:12.5px;margin-top:5px}
.nlist .nitem .udot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--accent);margin-top:8px}
@media (max-width:560px){.nlist .nitem{padding:14px 15px;gap:12px}}

/* pager (admin and member lists) */
.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 4px;font-size:13.5px;color:var(--text-3);font-weight:600}
.pager .pg{display:flex;gap:6px;flex-wrap:wrap}
.pager .pg a,.pager .pg span{display:inline-grid;place-items:center;min-width:40px;height:40px;padding:0 10px;border-radius:10px;border:1.5px solid var(--line-2);background:var(--surface);color:var(--text-2);font-weight:700}
.pager .pg .on{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.pager .pg .off{opacity:.45}

/* selects and textareas inside the design's .inp box */
select.inp{appearance:none;-webkit-appearance:none;background:var(--surface);color:var(--text);font-weight:500;padding-right:36px;cursor:pointer}
.inp textarea{border:0;outline:0;background:none;flex:1;min-width:0;padding:12px 0;color:var(--text);resize:vertical}
.field .err{font-weight:600}

/* video player shell – the custom controls of the design (.player) around a real <video> (assets/js/player.js) */
.vplayer{position:relative;background:#000;aspect-ratio:16/9;overflow:hidden;color:#fff;border-radius:var(--r);--pc:var(--primary)}
.vplayer video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.vplayer.flat{border-radius:0}
.vplayer .big,.vplayer .ctl,.vplayer .shade,.vplayer .topshade{transition:opacity .2s}
.vplayer.playing:not(.show-ui) .ctl,.vplayer.playing:not(.show-ui) .shade,.vplayer.playing:not(.show-ui) .topshade,.vplayer.playing:not(.show-ui) .ttl{opacity:0}
.vplayer.playing .big{display:none}
.vplayer .prog{cursor:pointer;touch-action:none}
.vplayer .ptop{position:absolute;top:14px;left:16px;right:16px;display:flex;align-items:center;gap:12px;min-width:0;transition:opacity .2s}
.vplayer .ptop .ttl,.vplayer .ptop .wm,.vplayer .pbl .wm{position:static}
.vplayer .ptop .ttl{flex:1;min-width:0}
.vplayer .ptop .wm{flex:none;max-width:45%}
.vplayer .wm img{height:34px;width:auto;max-width:100%;object-fit:contain}
.vplayer .pbl{position:absolute;left:16px;bottom:66px;max-width:45%}
.vplayer.playing:not(.show-ui) .ptop .ttl{opacity:0}
@media (max-width:640px){.vplayer .ptop{top:10px;left:12px;right:12px}.vplayer .wm img{height:26px}}
.vplayer .qmenu{position:absolute;right:14px;bottom:62px;background:rgba(20,20,20,.97);border-radius:12px;padding:6px;min-width:190px;z-index:5;font-size:14px;font-weight:600;color:#fff}
.vplayer .qmenu .qh{display:flex;align-items:center;min-height:40px;padding:0 10px;font-size:12.5px;color:rgba(255,255,255,.62)}
.vplayer .qmenu button{display:flex;width:100%;align-items:center;gap:10px;min-height:40px;padding:0 10px;border-radius:8px;color:#fff;font-weight:600;font-size:14px;text-align:left}
.vplayer .qmenu button small{color:rgba(255,255,255,.62);font-weight:600;font-size:12.5px}
.vplayer .qmenu button .ic{width:18px;height:18px;margin-left:auto}
.vplayer .qmenu button.on,.vplayer .qmenu button:hover{background:rgba(255,255,255,.12)}
@media (max-width:640px){.vplayer .qmenu{right:8px;bottom:56px;min-width:160px;max-height:calc(100% - 66px);overflow:auto}}
.vplayer .msg{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:20px;background:rgba(10,14,28,.82);font-weight:700;z-index:6}

/* ---------- admin shell: the main column may shrink, so a wide table scrolls inside its card instead of widening the page */
.adm-main{min-width:0}
/* the sidebar is sticky (one screen high): its colour runs down the whole column, so long pages and full-page pictures stay whole */
.adm{background:linear-gradient(90deg,var(--surface) 0 255px,var(--line) 255px 256px,transparent 256px)}
@media (max-width:1279px){.adm{background:linear-gradient(90deg,var(--surface) 0 227px,var(--line) 227px 228px,transparent 228px)}}
@media (max-width:979px){.adm{background:none}}
