/* r77 — Recently Watched / Favourites pages.
   Reuses the site's .vcard, .masonry, .vcell and .vlike so the cards look and
   behave exactly like the rest of HogTok. Only the page chrome is new. */

.lib-wrap{padding-bottom:60px}

.lib-head{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:20px;flex-wrap:wrap;margin-bottom:18px;
}
.lib-head h1{margin:0}
.lib-blurb{margin:8px 0 0;color:var(--muted);font-size:14px;line-height:1.6;max-width:60ch}

.lib-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* Watch-history switch (same visual language as the feed settings switch). */
.lib-switch{
  display:inline-flex;align-items:center;gap:9px;cursor:pointer;
  padding:8px 13px 8px 10px;border-radius:999px;
  background:var(--card);border:1px solid var(--border);color:inherit;
  font:inherit;font-size:12.5px;font-weight:700;line-height:1;
  transition:border-color .15s,color .15s;
}
.lib-switch i{
  position:relative;flex:none;width:34px;height:20px;border-radius:999px;
  background:rgba(255,255,255,.18);transition:background .15s;
}
.lib-switch i:after{
  content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;
  border-radius:50%;background:#fff;transition:transform .15s;
}
.lib-switch[aria-checked="true"]{border-color:var(--accent);color:#fff}
.lib-switch[aria-checked="true"] i{background:var(--accent)}
.lib-switch[aria-checked="true"] i:after{transform:translateX(14px)}
.lib-switch:hover{border-color:var(--accent2)}

.btn.is-confirming{
  border-color:#ff6b6b !important;color:#ff9a9a !important;
}

.lib-note{
  margin:0 0 16px;padding:10px 14px;border-radius:12px;
  background:rgba(37,131,255,.10);border:1px solid rgba(67,199,245,.28);
  color:#cfe2ff;font-size:13px;line-height:1.5;
}
.lib-note[hidden]{display:none}

/* Empty / disabled panel. */
.lib-off{
  background:var(--card);border:1px solid var(--border);border-radius:16px;
  padding:26px 24px;margin:6px 0 22px;max-width:620px;
}
.lib-off[hidden]{display:none}
.lib-off h2{margin:0 0 8px;font-size:19px;letter-spacing:-.01em}
.lib-off p{margin:0 0 16px;color:var(--muted);font-size:13.5px;line-height:1.6}

.lib-empty{padding-top:48px}
.lib-empty[hidden]{display:none}

/* Grid: same masonry as the rest of the site, with the card chrome reused. */
.lib-grid{margin-top:4px}
.lib-cell{position:relative}
.lib-cell .vcard{position:relative}
.lib-cell .lib-remove{
  position:absolute;right:10px;top:44px;z-index:6;
  width:26px;height:26px;border-radius:50%;cursor:pointer;
  display:grid;place-items:center;line-height:1;
  background:rgba(8,13,22,.72);border:1px solid rgba(255,255,255,.16);
  color:#fff;font-size:16px;font-weight:700;padding:0;
  backdrop-filter:blur(8px);opacity:0;transition:opacity .15s,border-color .15s,color .15s;
}
.lib-cell:hover .lib-remove,
.lib-cell:focus-within .lib-remove{opacity:1}
.lib-cell .lib-remove:hover{border-color:#ff6b6b;color:#ff9a9a}
.lib-cell .lib-remove:focus-visible{opacity:1;outline:2px solid var(--accent2);outline-offset:2px}

/* Resume progress bar along the bottom of a Recently Watched thumbnail. */
.lib-progress{
  position:absolute;left:0;right:0;bottom:0;height:4px;z-index:4;
  background:rgba(255,255,255,.22);
}
.lib-progress i{
  display:block;height:100%;border-radius:0 999px 999px 0;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
}
.lib-progress.is-done i{background:rgba(255,255,255,.55)}

/* "Watched" badge for clips finished to the end. */
.lib-done{
  position:absolute;left:10px;bottom:12px;z-index:4;
  font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  color:#cfe2ff;background:rgba(8,13,22,.78);
  padding:3px 8px;border-radius:6px;
}

@media(max-width:640px){
  .lib-head{align-items:flex-start;gap:14px}
  .lib-actions{width:100%}
  .lib-actions .btn{flex:1 1 auto}
  .lib-cell .lib-remove{opacity:1;top:40px;width:28px;height:28px}
  .lib-off{padding:20px 18px}
  .lib-note{font-size:12.5px}
}
