/* ============================================
   ROLLIT — COMMUNITY CSS
   Watch buttons, privacy toggle, notification
   center, and the community directory page.
   ============================================ */

/* Critic Score + Taste-Match chips on directory / suggestion cards. */
.comm-chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 4px 0 2px; }
.suggest-card-main .comm-chips { margin: 4px 0; }
.lb-name .cscore-chip { transform: scale(.92); }

/* ---- WATCH BUTTON (shared) ---- */
.watch-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all .18s; white-space: nowrap;
}
.watch-btn i { font-size: 15px; }
/* Public profile — primary "Watch" call to action */
.watch-btn.is-watch { background: var(--gold); color: #1a1000; }
.watch-btn.is-watch:hover { background: #f0d57a; transform: translateY(-1px); }
/* Private profile — "Request to Watch" */
.watch-btn.is-request { background: transparent; border-color: var(--border2, rgba(255,255,255,.18)); color: var(--text); }
.watch-btn.is-request:hover { border-color: var(--gold); color: var(--gold); }
/* Active follow — "Watching" (hover hints at unfollow) */
.watch-btn.is-watching { background: rgba(62,212,154,.12); border-color: rgba(62,212,154,.4); color: var(--toproll); }
.watch-btn.is-watching:hover { background: rgba(232,77,99,.12); border-color: rgba(232,77,99,.4); color: var(--flop); }
.watch-btn.is-watching:hover span { display: none; }
.watch-btn.is-watching:hover::after { content: 'Unwatch'; font-weight: 500; }
/* Pending request — "Requested" */
.watch-btn.is-requested { background: var(--surface2, rgba(255,255,255,.05)); border-color: var(--border2, rgba(255,255,255,.14)); color: var(--muted); }
.watch-btn.is-requested:hover { border-color: var(--flop); color: var(--flop); }

/* ---- PROFILE ACTIONS ROW ---- */
.profile-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 1.1rem; }

/* Privacy toggle (own profile) */
.privacy-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border2, rgba(255,255,255,.14));
  background: var(--surface2, rgba(255,255,255,.04)); transition: all .18s;
  /* A <button> with no colour of its own falls back to the UA's `buttontext`,
     which is BLACK — near-invisible on this surface. The variants below each set
     one, so only the plain ones (Remove photo, Report, Block) ever showed it. */
  color: var(--text);
}
.privacy-toggle i { font-size: 15px; }
.privacy-toggle.is-public  { color: var(--toproll); border-color: rgba(62,212,154,.35); }
.privacy-toggle.is-private { color: var(--gold); border-color: rgba(232,201,107,.35); }
.privacy-toggle:hover { transform: translateY(-1px); }
.privacy-hint { font-size: 12px; color: var(--dim); }

/* Locked (private) profile note */
.locked-note {
  display: flex; align-items: flex-start; gap: 10px; max-width: 460px;
  background: var(--surface2, rgba(255,255,255,.04));
  border: 0.5px solid var(--border2, rgba(255,255,255,.1));
  border-radius: 12px; padding: 14px 16px; margin-bottom: .4rem;
  font-size: 13.5px; line-height: 1.5; color: var(--muted);
}
.locked-note i { color: var(--gold); font-size: 18px; margin-top: 1px; flex-shrink: 0; }

/* Suspended account — the whole profile, replaced. Nothing to see, and the
   page says so rather than looking broken or empty. (profile.js) */
.suspended-profile { max-width: 30rem; margin: 4rem auto; padding: 2rem 1.5rem; text-align: center; }
.suspended-profile > i { font-size: 2.8rem; color: var(--flop); }
.suspended-profile h1 { font-family: 'Bebas Neue', sans-serif; font-size: 2.1rem; letter-spacing: 1px; margin: .5rem 0 .6rem; }
/* Self-contained: .status-tag lives in admin.css, which the profile page
   (rightly) doesn't load. */
.suspended-profile .status-tag {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px;
  border-radius: 20px; color: var(--flop); background: rgba(232,77,99,.14);
}
.suspended-profile p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 1rem 0 1.5rem; }

/* Social stats accent */
.pstat-social .pstat-val { color: var(--toproll); }

/* ---- NOTIFICATION CENTER ---- */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  background: var(--surface2, rgba(255,255,255,.04));
  border: 0.5px solid var(--border2, rgba(255,255,255,.1));
  color: var(--muted); transition: all .18s;
}
.notif-bell:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.notif-bell.has-unread { color: var(--gold); }
.notif-bell i { font-size: 17px; }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--flop, #e84d63); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120;
  width: 320px; max-height: 380px; overflow-y: auto; display: none;
  background: var(--surface, #1a1b28);
  border: 0.5px solid var(--border2, rgba(255,255,255,.12));
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.5); padding: 8px;
}
.notif-dropdown.open { display: block; }
.notif-head {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px 10px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--dim); border-bottom: 0.5px solid var(--border, rgba(255,255,255,.06));
}
.notif-head i { color: var(--gold); }
.notif-empty { padding: 22px 12px; text-align: center; font-size: 13px; color: var(--dim); }
.notif-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; }
.notif-row:hover { background: var(--surface2, rgba(255,255,255,.03)); }
.notif-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  background: linear-gradient(135deg, #2a1842, #1a2a3a); color: var(--gold);
  font-family: 'Bebas Neue', sans-serif; font-size: 15px;
}
.notif-info { flex: 1; min-width: 0; }
.notif-name { font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.notif-name:hover { color: var(--gold); }
.notif-sub { font-size: 11.5px; color: var(--dim); }

/* Social activity rows — the whole row opens the frame/title it's about, and
   the sub line wraps to two lines so a short comment is readable inline. */
.notif-social { cursor: pointer; }
.notif-social .notif-sub {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.notif-clear {
  margin-left: auto; background: transparent; border: none; cursor: pointer;
  color: var(--dim); font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 0;
}
.notif-clear:hover { color: var(--gold); }

/* Watch-party notification rows. */
.notif-avatar.wp-ava { background: linear-gradient(135deg, #3a2a12, #2a1f0a); color: var(--gold); font-size: 17px; }
.notif-avatar.wp-ava.on { background: linear-gradient(135deg, #7a2d1a, #b3441f); color: #fff; }
.notif-party-soon { cursor: pointer; }
.notif-party-soon .notif-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-party-soon.live .notif-sub { color: #ff8a3d; font-weight: 600; }
.notif-dismiss { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--dim); cursor: pointer; font-size: 15px; }
.notif-dismiss:hover { background: var(--surface2, rgba(255,255,255,.06)); color: var(--text); }

/* Resolved-prediction notification rows (clickable → open the title). */
.notif-pred { cursor: pointer; }
.notif-pred .notif-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-pred-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.notif-pred.pred-hit  .notif-pred-icon { background: rgba(62,212,154,.14); color: var(--toproll); }
.notif-pred.pred-miss .notif-pred-icon { background: rgba(232,77,99,.13);  color: var(--flop); }
.notif-actions { display: flex; gap: 6px; flex-shrink: 0; }
.notif-accept, .notif-decline {
  padding: 5px 10px; border-radius: 7px; font-family: inherit; font-size: 12px;
  font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .15s;
}
.notif-accept { background: var(--toproll); color: #06281c; }
.notif-accept:hover { filter: brightness(1.08); }
.notif-decline { background: transparent; border-color: var(--border2, rgba(255,255,255,.16)); color: var(--muted); }
.notif-decline:hover { border-color: var(--flop); color: var(--flop); }

/* ---- COMMUNITY DIRECTORY ---- */
.community-hero {
  background: linear-gradient(135deg, #0e1020 0%, #120e1a 50%, #0e1820 100%);
  border-bottom: 0.5px solid var(--border); padding: 3rem 2.5rem 2.2rem;
}
.community-hero-inner { max-width: var(--content-max, 1100px); margin: 0 auto; }
.community-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 3rem; line-height: 1;
  letter-spacing: 2px; margin-bottom: 6px;
}
.community-sub { font-size: 14px; color: var(--muted); }
.community-wrap { max-width: var(--content-max, 1100px); margin: 0 auto; padding: 2rem 2.5rem 3rem; }
.community-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.comm-card {
  background: var(--surface, #1a1b28);
  border: 0.5px solid var(--border2, rgba(255,255,255,.1));
  border-radius: 14px; padding: 1.3rem 1.1rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .18s, transform .18s;
}
.comm-card:hover { border-color: rgba(232,201,107,.35); transform: translateY(-2px); }
.comm-card-main { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.comm-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #2a1842, #1a2a3a); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem;
  border: 2px solid rgba(232,201,107,.25);
}
.comm-name { font-size: 15px; font-weight: 600; color: var(--text); }
.comm-lock { font-size: 13px; color: var(--muted); }
.comm-role { font-size: 10px; }
.comm-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.comm-meta strong { color: var(--text); }
.comm-dot { color: var(--dim); }
.comm-action { margin-top: 4px; width: 100%; display: flex; justify-content: center; }
.comm-action .watch-btn, .comm-action .btn { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ---- SUGGESTED FOR YOU ---- */
.community-suggest { margin-bottom: 2rem; }
.community-suggest-head { margin-bottom: 1rem; }
.community-suggest-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: .5px;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.community-suggest-title .ti { color: var(--gold); }
.community-suggest-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.suggest-row {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.suggest-card {
  background: var(--surface, #1a1b28);
  border: 0.5px solid rgba(232,201,107,.22);
  border-radius: 14px; padding: 1.1rem 1rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .18s, transform .18s;
}
.suggest-card:hover { border-color: rgba(232,201,107,.45); transform: translateY(-2px); }
.suggest-card-main { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; }
.suggest-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.suggest-reason {
  font-size: 11.5px; color: var(--gold); background: rgba(232,201,107,.1);
  padding: 3px 9px; border-radius: 20px;
}
.suggest-action { width: 100%; display: flex; justify-content: center; }
.suggest-action .watch-btn { width: 100%; justify-content: center; }

/* ---- FIND FRIENDS — search + invite toolbar ---- */
.community-tools { display: flex; gap: 12px; margin-bottom: 1.8rem; flex-wrap: wrap; }
.comm-search {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 9px;
  background: var(--surface2, rgba(255,255,255,.05)); border: 0.5px solid var(--border2, rgba(255,255,255,.1));
  border-radius: 12px; padding: 0 13px;
}
.comm-search .ti { color: var(--muted); font-size: 15px; }
.comm-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 14px; padding: 11px 0; }
.comm-search input::placeholder { color: var(--dim); }
.comm-invite-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap;
  background: var(--gold); color: #1a1000; border: none; border-radius: 12px;
  padding: 0 16px; font-family: inherit; font-size: 13.5px; font-weight: 600; transition: background .15s;
}
.comm-invite-btn:hover { background: #f0d57a; }
.comm-invite-btn.copied { background: var(--toproll); }
.comm-no-results { text-align: center; color: var(--muted); padding: 2rem; font-size: 14px; }
.community-dir-head { margin: 2rem 0 1rem; }

/* ---- SEARCH-FIRST HERO ---- */
.community-hero-search { padding-bottom: 2.6rem; }
.comm-search-hero {
  max-width: 620px; margin-top: 1.4rem;
  background: var(--surface, #1a1b28); padding: 3px 15px;
}
.comm-search-hero input { padding: 14px 0; font-size: 15px; }
.comm-search-clear {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 15px; display: flex; align-items: center; padding: 4px;
}
.comm-search-clear:hover { color: var(--text); }
.community-results { min-height: 40px; }
.community-invite-row { text-align: center; margin-top: 2.4rem; }

/* ============================================================
   HORIZONTAL SCROLLERS (shared) — used by the Home feed suggestion
   strips and the Drops "what to predict" strips. A hover arrow on each
   side (desktop mouse users, hidden at the ends and on touch), gentle
   scroll-snap, and a slim styled scrollbar.
   ============================================================ */
.hs-scroller { position: relative; }
.hs-row {
  display: flex; gap: 12px; align-items: flex-start;
  overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.hs-row::-webkit-scrollbar { height: 6px; }
.hs-row::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
.hs-row::-webkit-scrollbar-track { background: transparent; }
.hs-row > * { scroll-snap-align: start; }
.hs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text); border: 0.5px solid var(--border2);
  cursor: pointer; font-size: 16px; opacity: 0;
  transition: opacity .15s, background .15s; box-shadow: 0 3px 14px rgba(0,0,0,.4);
}
.hs-arrow.hs-left { left: -6px; }
.hs-arrow.hs-right { right: -6px; }
.hs-arrow:hover { background: var(--surface2); }
.hs-scroller:hover .hs-arrow { opacity: 1; }
.hs-scroller.at-start .hs-left,
.hs-scroller.at-end .hs-right { opacity: 0 !important; pointer-events: none; }
@media (hover: none) { .hs-arrow { display: none; } }

/* ---- LEADERBOARD ---- */
.leaderboard { margin-bottom: 2rem; }
.lb-tabs { display: flex; gap: 6px; margin-bottom: 1rem; flex-wrap: wrap; }
.lb-tab {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--surface2, rgba(255,255,255,.05)); border: 0.5px solid var(--border2, rgba(255,255,255,.1));
  color: var(--muted); border-radius: 20px; padding: 7px 14px; font-family: inherit; font-size: 12.5px; font-weight: 600; transition: all .15s;
}
.lb-tab:hover { color: var(--text); }
.lb-tab.active { background: var(--gold); color: #1a1000; border-color: var(--gold); }
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface, #1a1b28); border: 0.5px solid var(--border2, rgba(255,255,255,.1));
  border-radius: 12px; padding: 10px 14px;
}
.lb-rank { flex: 0 0 30px; text-align: center; font-family: 'Bebas Neue', sans-serif; font-size: 1.2rem; color: var(--muted); }
.lb-rank.lb-medal { font-size: 1.3rem; }
.lb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; text-decoration: none; }
.lb-av { width: 40px; height: 40px; flex: 0 0 40px; font-size: 1.05rem; }
.lb-text { min-width: 0; }
.lb-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-role { margin-top: 3px; font-size: 10px; }
.lb-metric { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.lb-action { flex: 0 0 auto; }
.lb-you { font-size: 12px; color: var(--dim); padding: 0 6px; }
.lb-genre-pick { display: flex; align-items: center; gap: 9px; margin-bottom: 1rem; flex-wrap: wrap; }
.lb-genre-label { font-size: 13px; color: var(--muted); }
.lb-genre-select {
  background: var(--surface2, rgba(255,255,255,.05)); color: var(--text);
  border: 0.5px solid var(--border2, rgba(255,255,255,.12)); border-radius: 10px;
  padding: 8px 12px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lb-genre-select:focus { outline: none; border-color: var(--gold); }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .notif-dropdown { width: 280px; }
  .community-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .suggest-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  /* Keep the ranking metric visible (it's the point of the board) but tighten
     the row: drop the role badge and let the Watch button shrink. */
  .lb-role { display: none; }
  .lb-metric { font-size: 12px; }
  .lb-action .watch-btn span { display: none; }
  .lb-action .watch-btn { padding: 7px 10px; }
}
