/* Project-level override of the DS danger colour (loaded after
   vendor/blackbox-ds/styles.css, so this wins in the cascade). */
:root {
  --bb-danger: var(--bb-magenta);
}

/* BlackBoxDS required page shell (see the DS README): several components use
   translucent fills that assume a dark canvas underneath. */
html, body {
  min-height: 100vh;
}
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bb-bg);
  color: var(--bb-text);
  font-family: var(--bb-font-ui);
}

/* Every #content variant is a flex item of body and must grow to fill the
   viewport so the footer stays pinned to the bottom on short pages, even
   when content_class is overridden to something other than .bb-page. */
#content {
  flex: 1 0 auto;
}

/* Default content wrapper (pages needing something different override the
   `content_class` block instead of fighting these). */
.bb-page {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px 64px;
  box-sizing: border-box;
}

/* ── Bootstrap-shaped primitives, reimplemented on --bb-* tokens ──────────
   A handful of gameplay screens (host/board/play consoles) still use these
   class names directly rather than mounting a DS component per-button; kept
   as literal Bootstrap-style names so those call sites didn't need touching,
   but the rules themselves no longer come from Bootstrap. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 18px;
  border-radius: var(--bb-radius-control);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--bb-font-ui);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: filter .15s, background .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { color: var(--bb-bg); background: var(--bb-grad-cyan-blue); font-weight: 700; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-secondary { color: var(--bb-text); background: rgba(255,255,255,0.06); border-color: var(--bb-border-strong); }
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
.btn-outline-secondary { color: var(--bb-text-muted); background: transparent; border-color: rgba(255,255,255,0.16); }
.btn-outline-secondary:hover:not(:disabled) { color: var(--bb-text); border-color: rgba(255,255,255,0.28); }
.btn-success { color: #06210f; background: var(--bb-online); font-weight: 700; }
.btn-danger { color: #2a0b0b; background: var(--bb-danger); font-weight: 700; }
.btn-light { color: var(--bb-bg); background: #eef1f7; font-weight: 700; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.form-control, .form-select, .form-range {
  font-family: var(--bb-font-ui);
  font-size: 15px;
  color: var(--bb-text);
}
.form-control, .form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--bb-radius-control);
  border: 1px solid var(--bb-border-strong);
  background: rgba(255,255,255,0.04);
  box-sizing: border-box;
}
.form-range { accent-color: var(--bb-cyan); width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--bb-font-ui);
  background: rgba(255,255,255,0.06);
  color: var(--bb-text-muted);
}
