/* Multiplayer lobby in Retro Pop, cream paper (reports/multiplayer-retro-20261026/): #multiplayerLobbyModal of the home and
   the home's #multiplayer section. Loaded after the theme block (retro-pop.css, retro/_bridge.css, retro/_shared.css,
   retro/home.css, which already dresses the lobby in section 3) and before the chat's own sheet. Only --rp-* tokens.
   What it adds on top of retro/home.css: the third column of the lobby (03 Who's online, 04 Lobby chat: markup of
   coluna.html, filled and docked by assets/js/multiplayer-retro.js), numbered card heads like the PLAY2 panel, room cards
   with a bigger box art, console and players, red primary actions, and the narrow-screen layout (two columns below 1200,
   the side column under them; the lobby's own tabs below 780). Specificity: (0,2,2)+ over home.css's (0,1,1)-(0,2,1). */

/* ---- 1. the modal: a little tighter, three columns ---------------------------------------------------------------- */
html.retro-pop body .multiplayer-lobby-modal { padding: 14px; }
html.retro-pop body .multiplayer-lobby-content { width: min(1720px, 100%); padding: 16px; }
html.retro-pop body .multiplayer-lobby-grid {
  grid-template-columns: minmax(320px, 370px) minmax(0, 1fr) minmax(290px, 330px);
  gap: 16px;
  align-items: start;
  min-height: 0;
}
html.retro-pop body .multiplayer-lobby-header { min-height: 0; margin-bottom: 14px; padding: 12px 18px 14px 20px; }
html.retro-pop body .multiplayer-lobby-title h2 { font-size: clamp(22px, 2.2vw, 32px); }
html.retro-pop body .multiplayer-lobby-title p { margin-top: 8px; font-size: 14px; }
html.retro-pop body .multiplayer-online-count span { color: #17131f !important; font: 800 13px/1 var(--rp-ff-mono) !important; }
html.retro-pop body .multiplayer-online-count span + span { font-family: var(--rp-ff-body) !important; text-transform: uppercase; letter-spacing: .08em; font-size: 11px !important; }

/* ---- 2. numbered heads on the four cards (01 Create, 02 Rooms, 03 Who's online, 04 Lobby chat) -------------------- */
html.retro-pop body .multiplayer-create-panel h3,
html.retro-pop body .multiplayer-rooms-header h3,
html.retro-pop body .mpr-head h3 {
  display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0;
  color: #17131f; font: 400 14px/1 var(--rp-ff-sticker); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap;
}
html.retro-pop body .multiplayer-create-panel h3::before,
html.retro-pop body .multiplayer-rooms-header h3::before,
html.retro-pop body .mpr-num {
  content: "01"; display: inline-block; flex: none; width: auto; height: auto; flex-basis: auto; padding: 3px 5px 2px;
  border: 2px solid #17131f; border-radius: 0; background: #17131f; color: #f5ebd7; box-shadow: none;
  font: 700 11px/1 var(--rp-ff-mono); letter-spacing: 0;
}
html.retro-pop body .multiplayer-rooms-header h3::before { content: "02"; }
html.retro-pop body .mpr-head { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; }
html.retro-pop body .mpr-head::after { content: ""; flex: 1; min-width: 12px; border-top: 3px dashed #17131f; opacity: .3; order: 2; }
html.retro-pop body .mpr-count {
  order: 3; flex: none; padding: 4px 8px; border: 2px solid #17131f; background: var(--rp-lime); color: #17131f;
  font: 800 10.5px/1 var(--rp-ff-body); letter-spacing: .06em; text-transform: uppercase;
}
html.retro-pop body .mp-create-panel-head { align-items: center; padding-bottom: 10px; margin-bottom: 12px; }
html.retro-pop body .mp-create-panel-head p,
html.retro-pop body .multiplayer-rooms-header p { margin: 6px 0 0; font-size: 12.5px; }

/* ---- 3. the side column: two paper cards ------------------------------------------------------------------------ */
html.retro-pop body .mp-side-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
html.retro-pop body .mp-side-card {
  position: relative; padding: 12px 14px 14px; border: 3px solid #17131f; border-radius: 0; background: #fffaf0; color: #17131f;
  box-shadow: var(--rp-sh-2);
}
/* 03 who's online */
html.retro-pop body .mp-online-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; max-height: 300px; overflow: auto; scrollbar-width: thin; }
html.retro-pop body .mp-online-person {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 4px 10px 4px 4px;
  border: 2px solid #17131f; border-radius: 0; background: var(--rp-paper); color: #17131f; box-shadow: none; cursor: pointer;
  text-align: left; font: 700 13px/1.2 var(--rp-ff-body); transition: transform var(--rp-t-fast) var(--rp-e-out), box-shadow var(--rp-t-fast) var(--rp-e-out);
}
html.retro-pop body .mp-online-person:hover,
html.retro-pop body .mp-online-person:focus-visible { background: var(--rp-yellow); transform: translate(-1px, -2px); box-shadow: var(--rp-sh-1); }
html.retro-pop body .mp-online-person:disabled { cursor: default; transform: none; box-shadow: none; }
html.retro-pop body .mp-online-avatar {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border: 2px solid #17131f; border-radius: 50%;
  background: var(--rp-cyan); color: #17131f; font: 400 13px/1 var(--rp-ff-display);
}
html.retro-pop body .mp-online-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
html.retro-pop body .mp-online-person.is-host .mp-online-avatar { box-shadow: 0 0 0 2px #fffaf0, 0 0 0 4px var(--rp-lime); }
html.retro-pop body .mp-online-copy { display: grid; gap: 2px; min-width: 0; }
html.retro-pop body .mp-online-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #17131f; font: 800 13px/1.2 var(--rp-ff-body); }
html.retro-pop body .mp-online-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rp-ink-2); font: 600 11.5px/1.2 var(--rp-ff-body); }
html.retro-pop body .mp-online-empty {
  margin: 0; padding: 10px 12px; border: 2px dashed var(--rp-ink-soft); background: var(--rp-paper); color: var(--rp-ink-2);
  font: 600 12.5px/1.4 var(--rp-ff-body); text-align: center;
}
html.retro-pop body .mp-online-empty[hidden] { display: none; }
/* 04 lobby chat: the site's #liveChat docked here (multiplayer-retro.js) */
html.retro-pop body .mp-chat-host { display: none; }
html.retro-pop body .mp-chat-host.is-docked { display: block; height: clamp(380px, 52vh, 600px); border: 3px solid #17131f; background: #17131f; }
html.retro-pop body.mp-chat-docked #mpLobbyChatHost #liveChat#liveChat.live-chat,
html.retro-pop body.mp-chat-docked.og-chat-open #mpLobbyChatHost #liveChat#liveChat.live-chat {
  display: flex !important; position: static !important; inset: auto !important; width: 100% !important; height: 100% !important;
  max-height: none !important; min-height: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; transform: none !important;
}
/* docked, the chat has no close or minimize of its own: the column is its place while the lobby is open */
html.retro-pop body.mp-chat-docked #mpLobbyChatHost #liveChat#liveChat #closeChatBtn,
html.retro-pop body.mp-chat-docked #mpLobbyChatHost #liveChat#liveChat #minimizeChat { display: none !important; }
html.retro-pop body.mp-chat-docked #chatToggleBtn#chatToggleBtn.chat-toggle-btn,
html.retro-pop body.mp-chat-docked #chatToggleBtn#chatToggleBtn { display: none !important; }
html.retro-pop body .mp-chat-note { margin: 8px 0 0; color: var(--rp-ink-2); font: 600 11.5px/1.4 var(--rp-ff-body); }
/* the profile card (user-profile-modal.js, z-index 100001) opened from the list shows over the lobby (2147482000) */
html.retro-pop body.mp-lobby-open #nxUserModal { z-index: 2147482600; }
html.retro-pop body .mp-chat-host.is-docked + .mp-chat-note { margin-top: 8px; }

/* ---- 4. rooms: classified cards with the box art, the console, the host and the players --------------------------- */
html.retro-pop body .multiplayer-rooms-panel { padding: 14px; }
html.retro-pop body .multiplayer-rooms-list,
html.retro-pop body .multiplayer-rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 12px; align-content: start; }
html.retro-pop body .multiplayer-room-card {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px 14px; align-items: start; margin: 0; padding: 12px 12px 12px 22px;
}
html.retro-pop body .multiplayer-room-game {
  width: 92px; aspect-ratio: 3 / 4; overflow: hidden; border: 2px solid #17131f; border-radius: 0; background: var(--rp-paper-3); box-shadow: 3px 3px 0 #17131f;
}
html.retro-pop body .multiplayer-room-game img,
html.retro-pop body .mp-room-cover-img { display: block; width: 100%; height: 100%; object-fit: cover; }
html.retro-pop body .mp-room-cover-fallback { display: grid; place-items: center; width: 100%; height: 100%; font: 400 20px/1 var(--rp-ff-display); }
html.retro-pop body .multiplayer-room-info { min-width: 0; display: grid; gap: 6px; }
html.retro-pop body .mp-room-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html.retro-pop body .multiplayer-room-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 400 18px/1.05 var(--rp-ff-display); }
html.retro-pop body .multiplayer-room-game-name { display: flex; align-items: center; gap: 7px; min-width: 0; color: #17131f; font: 700 12.5px/1.3 var(--rp-ff-body); }
html.retro-pop body .multiplayer-room-game-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.retro-pop body .multiplayer-room-game-name i { flex: none; width: 5px; height: 5px; }
html.retro-pop body .multiplayer-room-host { display: flex; align-items: center; gap: 8px; }
html.retro-pop body .multiplayer-room-host-avatar {
  position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; overflow: hidden; border: 2px solid #17131f; border-radius: 50%;
  background: var(--rp-cyan); color: #17131f; font: 400 11px/1 var(--rp-ff-display);
}
html.retro-pop body .multiplayer-room-host-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
html.retro-pop body .multiplayer-room-host-name {
  min-width: 0; padding: 0; border: 0; background: none; color: #17131f; font: 700 12.5px/1.2 var(--rp-ff-body); text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--rp-cyan); cursor: pointer;
}
html.retro-pop body .multiplayer-room-host-name:hover { text-decoration-color: var(--rp-red); }
html.retro-pop body .multiplayer-room-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 10px; border-top: 2px dashed var(--rp-ink-soft); }
html.retro-pop body .mp-room-capacity { display: flex; align-items: center; gap: 10px; }
html.retro-pop body .player-slots { display: flex; gap: 4px; }
html.retro-pop body .player-slot {
  display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #17131f; border-radius: 0; background: #fffaf0; color: #17131f;
  font: 700 9px/1 var(--rp-ff-mono);
}
html.retro-pop body .player-slot.filled { background: var(--rp-lime); }
html.retro-pop body .multiplayer-room-players { color: var(--rp-ink-2); font: 700 11px/1 var(--rp-ff-mono); letter-spacing: .04em; text-transform: uppercase; }
html.retro-pop body .multiplayer-room-players strong { color: #17131f; }
html.retro-pop body .multiplayer-room-players.full strong { color: var(--rp-red-deep); }
html.retro-pop body .mp-room-action-buttons { display: flex; gap: 8px; }
html.retro-pop body .multiplayer-join-btn,
html.retro-pop body .multiplayer-play-btn,
html.retro-pop body .multiplayer-watch-btn,
html.retro-pop body .multiplayer-close-room-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px;
  border: 2px solid #17131f; border-radius: var(--rp-r-1); background: #fffaf0; color: #17131f; box-shadow: var(--rp-sh-1);
  font: 800 12px/1 var(--rp-ff-body); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform var(--rp-t-fast) var(--rp-e-out), box-shadow var(--rp-t-fast) var(--rp-e-out);
}
html.retro-pop body .multiplayer-join-btn,
html.retro-pop body .multiplayer-play-btn { background: var(--rp-red); }
html.retro-pop body :is(.multiplayer-join-btn, .multiplayer-play-btn, .multiplayer-watch-btn, .multiplayer-close-room-btn):not(:disabled):hover { transform: translate(-1px, -2px); box-shadow: var(--rp-sh-2); }
html.retro-pop body .multiplayer-join-btn:disabled { background: var(--rp-paper-3); color: var(--rp-ink-2); box-shadow: none; cursor: not-allowed; }
html.retro-pop body .multiplayer-empty-state { border: 3px dashed var(--rp-ink-soft); background: var(--rp-paper); color: var(--rp-ink-2); }
html.retro-pop body .multiplayer-empty-state h4 { color: #17131f; font: 400 18px/1.1 var(--rp-ff-display); text-transform: uppercase; }
html.retro-pop body .multiplayer-empty-state .mp-text-icon { border: 2px solid #17131f; border-radius: 0; background: #fffaf0; color: #17131f; font-family: var(--rp-ff-mono); }
html.retro-pop body .multiplayer-filter-btn { min-height: 36px; font-size: 11.5px; }
html.retro-pop body .mp-filter-ico { font-family: var(--rp-ff-mono); }

/* ---- 5. create: the red button and the form, a bit tighter --------------------------------------------------------- */
html.retro-pop body .multiplayer-create-panel { padding: 14px; }
html.retro-pop body .mp-room-family-picker { gap: 8px; margin-bottom: 12px; }
html.retro-pop body .mp-room-family-picker button { min-height: 84px; padding: 10px; }
html.retro-pop body .multiplayer-form-group { margin-bottom: 10px; }
html.retro-pop body .multiplayer-form-group label { font-size: 10.5px; }
html.retro-pop body .mp-room-advanced summary { font-size: 12.5px; }
html.retro-pop body .multiplayer-create-btn { min-height: 54px; }

/* ---- 6. the home section: the feed's room cards get the same red "join" ------------------------------------------ */
html.retro-pop body .pn-feed .pn-room-go { background: var(--rp-red); color: #17131f; }
html.retro-pop body .pn-feed .pn-room-card:hover .pn-room-go { background: var(--rp-yellow); }

/* ---- 7. widths: two columns below 1200 (the side column under them), the lobby's own tabs below 780 ---------------- */
@media (max-width: 1199px) {
  html.retro-pop body .multiplayer-lobby-grid { grid-template-columns: minmax(320px, 360px) minmax(0, 1fr); }
  html.retro-pop body .mp-side-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  html.retro-pop body .mp-online-list { max-height: 220px; }
  html.retro-pop body .multiplayer-rooms-list,
  html.retro-pop body .multiplayer-rooms-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  html.retro-pop body .mp-side-panel { display: none; }
  html.retro-pop body .multiplayer-room-card { grid-template-columns: 72px minmax(0, 1fr); padding-left: 18px; }
  html.retro-pop body .multiplayer-room-game { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html.retro-pop body :is(.mp-online-person, .multiplayer-join-btn, .multiplayer-play-btn, .multiplayer-watch-btn, .multiplayer-close-room-btn) { transition-duration: 1ms; }
}
