/* ==========================================================================
   Base: design tokens, reset, accessibility helpers, shared controls
   ========================================================================== */

:root {
  /* colour */
  --bg: #0e1715;
  --panel: #111e19;
  --well: #0b130f; /* recessed surfaces: meters, canvases */
  --line: #34493d;
  --line-strong: #506656;
  --text: #d7e7de;
  --muted: #91ac9c;
  --idle: #829489;
  --accent: #b9f045;
  --accent-hover: #d6f77f;
  --on-accent: #101b12; /* text on top of --accent */
  --toast: #243c28;
  --overlay: #0e1715d9;
  --overlay-soft: #0e1715cc;

  /* type */
  font-family: Consolas, 'Cascadia Code', 'Courier New', monospace;
  font-size: 12px;

  /* sizes */
  --header-height: 58px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* The `hidden` attribute must win over any `display` set by components. */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Visible to screen readers only. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Message shown when JavaScript is disabled. */
.noscript {
  padding: 24px;
}

/* ---- buttons ---- */

/* Outlined button used in the viewer toolbar and the HID actions. */
.btn {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 9px 11px;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: bold;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

/* Small text-only action in a panel heading. */
.btn-text {
  background: transparent;
  border: 0;
  padding: 2px;
  color: var(--accent);
  font-size: 10px;
  white-space: nowrap;
}

/* ---- controller-specific sections ---- */

/* <body data-kind> is set by the app to the selected controller family. */
body[data-kind='xbox'] .ps-only,
body[data-kind='ps'] .xbox-only {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
