/* steamcommunity.report — "Saved players" modal.
   Lists the signed-in user's bookmarks. Same 2002-Steam homage as site.css /
   reviews.css: flat & square, 1px olive borders, gold accents, two-tone
   uppercase heading. Reuses the :root tokens from site.css (--bg-in / --panel /
   --frame / --fg / --muted / --gold / --gold-dim / --white / --font / --mono).
   The only literals here are the small olive border hexes (#3a3d2e / #34372a /
   #23251a / #16170f / #3c4032) that already recur throughout site.css /
   reviews.css — kept verbatim for visual continuity.

   Mirrors .admin-modal / .legal-modal: backdrop + panel + close + Escape +
   click-backdrop. saved.js owns the behaviour. */

/* ---- modal scaffolding (mirrors .legal-modal / .admin-modal) ----------- */
.saved-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.saved-modal[hidden] { display: none; }
.saved-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.78);
  backdrop-filter: blur(2px);
}
.saved-modal__panel {
  position: relative; z-index: 1;
  background: var(--bg-in); border: 1px solid var(--gold-dim);
  max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto;
  padding: 22px 26px 26px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  scrollbar-width: thin; scrollbar-color: var(--frame) rgba(0,0,0,.15);
}
.saved-modal__panel::-webkit-scrollbar { width: 8px; }
.saved-modal__panel::-webkit-scrollbar-track { background: rgba(0,0,0,.15); }
.saved-modal__panel::-webkit-scrollbar-thumb { background: var(--frame); }
.saved-modal__close {
  position: absolute; top: 8px; right: 12px;
  width: 32px; height: 32px;
  background: none; border: none; color: var(--muted);
  font-size: 24px; line-height: 1; cursor: pointer; font-family: var(--font);
}
.saved-modal__close:hover { color: var(--gold); }
.saved-modal__close:focus-visible { outline: 1px dashed var(--gold); outline-offset: 2px; }

/* header: title + live count, sat above the list */
.saved-modal__head {
  margin: 0 0 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--frame);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.saved-modal__title {
  margin: 0; font-size: 19px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--white);
}
.saved-modal__count {
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  min-width: 18px; text-align: center; line-height: 1;
  padding: 2px 5px; border: 1px solid var(--gold-dim); border-radius: 0;
  color: var(--gold); background: rgba(0,0,0,.20);
}
.saved-modal__count[hidden] { display: none; }

/* ---- list + rows ------------------------------------------------------- */
.saved-list { list-style: none; margin: 0; padding: 0; }

.saved-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--panel); border: 1px solid #34372a;
  padding: 9px 12px; margin: 0 0 8px;
}
.saved-row:last-child { margin-bottom: 0; }

/* avatar thumb (placeholder square when missing) */
.saved-av {
  width: 28px; height: 28px; flex-shrink: 0; display: block;
  object-fit: cover; border: 1px solid #34372a; background: #3c4032;
}
.saved-av--ph { display: inline-block; background: #23251a; }

/* persona / steamid link + optional note stack in the middle column */
.saved-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.saved-name {
  font-size: 13px; font-weight: 700; color: var(--fg); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.saved-name:hover { color: var(--gold); text-decoration: none; }
.saved-note {
  font-size: 12px; color: var(--muted); line-height: 1.4;
  overflow-wrap: break-word; word-break: break-word;
}

/* small × remove button (mirrors .review-card__del) */
.saved-remove {
  margin-left: 4px; flex-shrink: 0;
  width: 22px; height: 22px; line-height: 1;
  display: grid; place-items: center;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font-size: 17px; font-family: var(--font);
  transition: color .15s ease;
}
.saved-remove:hover { color: #e6a08f; }
.saved-remove:focus-visible { outline: 1px dashed var(--gold); outline-offset: 2px; }
.saved-remove:disabled { opacity: .5; cursor: default; }

/* ---- loading / empty / error states ------------------------------------ */
.saved-empty {
  padding: 30px 16px; text-align: center;
  border: 1px dashed var(--frame); background: rgba(0,0,0,.12);
  font-size: 13px; color: var(--muted);
}
.saved-empty--err { border-color: #8a4a3a; background: rgba(158,58,44,.08); color: #e6a08f; }

/* inline "action failed" note appended under the list */
.saved-rowerr { margin-top: 8px; font-size: 12px; color: #e6a08f; text-align: center; }

/* ---- Mobile ------------------------------------------------------------ */
@media (max-width: 720px) {
  .saved-modal { padding: 10px; }
  .saved-modal__panel { padding: 16px 12px 20px; max-height: 90vh; }
  .saved-modal__title { font-size: 17px; }
  .saved-row { padding: 8px 10px; gap: 9px; }
}
