/* RISE OF RIVALS -- online.
 *
 * Loaded after style.css and only adds what a table of real people needs:
 * the room screen, the presence strip in the top bar, chat, and the banner
 * that appears when the socket drops.  Every colour comes from the tokens
 * style.css already defines, so the two screens are one design.
 */

/* ---------------- the table ---------------- */

.mp-card { width: min(920px, 100%); }
.mp-tag {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-warm); vertical-align: middle; margin-left: 10px;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
  -webkit-text-fill-color: var(--accent-warm);   /* the h1 is a gradient clip */
}

.mp-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--dim); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; margin: 20px 0;
}
.mp-or::before, .mp-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line-soft);
}

.mp-room-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line-soft);
}
.mp-room-head > div:first-child { flex: 1; min-width: 0; }
.mp-rename {
  display: flex; flex-direction: column; gap: 5px; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.mp-rename input { width: 150px; }
.mp-label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.mp-code {
  font-family: var(--mono); font-size: 21px; color: var(--accent);
  letter-spacing: .04em; word-break: break-all;
}

.mp-columns {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px;
}
@media (max-width: 780px) {
  .mp-columns { grid-template-columns: minmax(0, 1fr); }
}
.mp-seats { display: flex; flex-direction: column; gap: 10px; }

/* one more column than the hot-seat lobby's row: who is actually sitting here.
   The faction name is the long one, so it gets the room and the rest shrink. */
.mp-seat-row {
  grid-template-columns: 30px minmax(120px, 1.6fr) minmax(0, auto) auto auto;
  gap: 10px; padding: 10px;
}
.mp-seat-row select.faction { min-width: 0; }
.mp-seat-row.mine { background: var(--raise); box-shadow: inset 0 0 0 1px var(--seat); }
.mp-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mp-seat-actions { display: flex; align-items: center; gap: 8px; }
.mp-seat-actions select { max-width: 150px; }
.primary.small { padding: 6px 12px; font-size: 12px; }

.mp-host { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.mp-host .field-row { margin-bottom: 12px; }
.field-row.toggles { align-items: center; flex-wrap: wrap; }
label.check {
  flex-direction: row; align-items: center; gap: 8px;
  text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink);
}
label.check input { accent-color: var(--accent); }

/* ---------------- roster ---------------- */

.mp-roster { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mp-roster-row {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  padding: 6px 9px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px;
}
.mp-roster-row.off { opacity: .5; }
.mp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--dim); box-shadow: 0 0 10px -2px currentColor;
}

.mp-chip {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 8px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--dim); background: var(--panel);
}
.mp-chip.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.mp-chip.off { color: var(--dim); }
.mp-chip.bot { color: var(--accent-warm); border-color: color-mix(in srgb, var(--accent-warm) 40%, var(--line)); }
.mp-chip.empty { color: var(--dim); border-style: dashed; }
.mp-chip.host { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mp-chip.seat { font-family: var(--mono); }

/* ---------------- chat ---------------- */

.mp-chat-log {
  height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; font-size: 12.5px; line-height: 1.45;
}
.mp-chat-line { color: var(--ink); word-break: break-word; }
.mp-chat-line b { color: var(--accent); font-weight: 600; margin-right: 2px; }
.mp-chat-form { margin-top: 8px; }
.mp-chat-form input { width: 100%; }

/* the in-game dock: the same log, pinned out of the board's way */
.mp-dock {
  position: fixed; right: 16px; bottom: 16px; width: 320px; z-index: 40;
  background: linear-gradient(180deg, #18202c, var(--panel));
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
}
.mp-dock-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 9px;
}
.mp-dock-head .ghost { padding: 2px 7px; }
#mp-chat-open.unread { border-color: var(--accent-warm); color: var(--accent-warm); }

/* ---------------- presence, in the top bar ---------------- */

.mp-presence { display: flex; gap: 7px; align-items: center; flex: none; }
.mp-seat-chip {
  --seat: var(--accent);
  font-size: 11px; white-space: nowrap; border-radius: 999px; padding: 4px 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--seat);
  max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.mp-seat-chip.acting {
  border-color: currentColor; box-shadow: 0 0 14px -4px currentColor;
  background: var(--raise);
}
.mp-seat-chip.off { opacity: .45; text-decoration: line-through; }

/* the top bar is a flex row that already has a growing #status; keep the
   presence strip from squeezing the controls off the end on a small window */
@media (max-width: 1200px) { .mp-presence { display: none; } }

/* ---------------- connection banner ---------------- */

.mp-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--accent-warm); color: #241703; font-weight: 600;
  font-size: 12.5px; letter-spacing: .04em;
  padding: 7px 20px; border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .9);
}

/* The view picker sits in the top bar beside the presence strip: online it is
   the room's, not the browser's -- a seated player is locked to their own
   seat, and only a watcher may move around the table. */
.mp-view {
  display: flex; align-items: center; gap: 6px; flex: none;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim);
}
.mp-view select { padding: 4px 8px; font-size: 12px; }
@media (max-width: 1200px) { .mp-view { display: none; } }
