/* ---------- announcement editor ---------- */
.message-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 8, 12, 0.72);
}
.message-modal-backdrop.active {
  display: block;
}
.message-modal {
  display: none;
  position: fixed;
  z-index: 41;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.message-modal.active {
  display: block;
}
.message-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.message-modal-head h2 {
  margin: 0;
}
.message-modal-head p {
  margin: 5px 0 0;
  color: var(--ink-3);
}
.message-modal-body {
  padding: 18px 22px 22px;
}
.message-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  color: var(--ink-3);
  font-size: 13px;
}
.format-btn {
  min-width: 32px;
  padding: 5px 9px;
}
.message-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.message-toolbar input[type="color"] {
  width: 30px;
  height: 28px;
  padding: 2px;
}
.message-toolbar select {
  padding: 5px 8px;
}
#messageText {
  display: block;
  width: 100%;
  min-height: 130px;
  resize: vertical;
  box-sizing: border-box;
  padding: 12px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  font: inherit;
}
.message-preview-label {
  margin: 16px 0 6px;
  color: var(--ink-3);
  font-size: 12px;
  text-transform: uppercase;
}
.message-preview {
  min-height: 54px;
  padding: 12px;
  color: var(--ink);
  background: #10161d;
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.message-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* The nickname doubles as the link out, using the same compact Steam profile chrome. */
.steam-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 9px 3px 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.steam-btn::after {
  content: "\2197";
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  transition: color 0.12s;
}
.steam-btn:hover {
  background: var(--panel-3);
  border-color: var(--line-2);
  color: var(--ink);
}
.steam-btn:hover::after {
  color: var(--signal);
}

.role-badge {
  /* Fallback, so a role the panel doesn't have a colour for still renders as a badge
     rather than as an invalid color-mix. */
  --role: var(--ink-2);
  display: inline-block;
  padding: 3px 9px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--ink-2);
}
/* One graded ramp, the way a game grades rarity: the colour alone tells you where in
   the order a role sits, without having to know the scale first. Four greys couldn't —
   you had to already know that fainter meant lower.
   Every shade is mixed from the single token per role, so retuning one is one value. */
.role-User {
  --role: var(--role-user);
}
.role-Moderator {
  --role: var(--role-mod);
}
.role-Admin {
  --role: var(--role-admin);
}
.role-Core {
  --role: var(--role-core);
}

/* Every step wears the same chip; only the hue changes. Core was filled solid, on the
   argument that the top of a ramp should read before you have identified any colour —
   but a saturated block of red in a column of tinted outlines doesn't read as "highest",
   it reads as an alert, and there are only ever a couple of them on screen. The ramp
   carries the order on its own. */
.role-badge {
  color: color-mix(in srgb, var(--role) 72%, var(--ink));
  border-color: color-mix(in srgb, var(--role) 46%, transparent);
  background: color-mix(in srgb, var(--role) 14%, transparent);
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink-3);
}
.status-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-off);
}
.status-dot.online {
  color: var(--ink-2);
}
.status-dot.online::before {
  background: var(--live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 16%, transparent);
}
