/*
 * Camera & mic check — styles.
 *
 * Loaded as a file, never inline: the site's CSP is 'style-src self', so a <style> block or a
 * style="..." attribute would be dropped by the browser and the page would render unstyled.
 * Everything cosmetic therefore lives here, and check.js only ever toggles classes.
 */

:root {
  --bg: #0b0b10;
  --panel: #15151f;
  --panel-2: #1c1c28;
  --line: #2a2a3a;
  --ink: #ececf4;
  --ink-dim: #a0a0b4;
  --accent: #7c5cff;
  --ok: #2fbf71;
  --warn: #ffb020;
  --err: #ff5c6c;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  padding: 0 0 env(safe-area-inset-bottom);
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}

/* ---------- head ---------- */

.head h1 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.head__sub {
  margin: 0 0 20px;
  color: var(--ink-dim);
}

/* ---------- verdict ---------- */

.verdict {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 14px;
  background: var(--panel);
  padding: 16px 18px;
  margin-bottom: 18px;
}

.verdict__big {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 650;
}

.verdict__sub {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14.5px;
}

/* The verdict's colour IS the message: red = browser is refusing, amber = a prompt will appear,
   green = already allowed, grey = we cannot tell from here (Safari/Firefox). */
.verdict.is-blocked {
  border-left-color: var(--err);
}
.verdict.is-prompt {
  border-left-color: var(--warn);
}
.verdict.is-ok {
  border-left-color: var(--ok);
}
.verdict.is-unknown {
  border-left-color: var(--ink-dim);
}

/* ---------- cards ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 14px;
}

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
}

.card__sub,
.card p {
  color: var(--ink-dim);
  margin: 0 0 12px;
}

.card__do {
  color: var(--ink) !important;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 0 !important;
}

.card--warn {
  border-color: #6a4a12;
  border-left: 5px solid var(--warn);
}

.card--warn h2 {
  color: var(--warn);
}

/* ---------- button ---------- */

.btn {
  appearance: none;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  padding: 13px 18px;
  width: 100%;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  margin-top: 10px;
}

/* ---------- preview ---------- */

.preview {
  margin: 14px 0 0;
}

.preview video {
  width: 100%;
  max-height: 46vh;
  border-radius: 12px;
  background: #000;
  display: block;
  /* Mirrored so a selfie view looks like a mirror, which is what people expect to see. */
  transform: scaleX(-1);
}

.preview__note {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-dim);
}

/* ---------- test result ---------- */

.result {
  margin: 14px 0 0;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel-2);
  font-size: 15px;
}

.result.is-ok {
  border-left: 5px solid var(--ok);
}

.result.is-err {
  border-left: 5px solid var(--err);
}

/* ---------- platform fix cards ---------- */

.fixes__sub {
  color: var(--ink-dim);
  margin: 0 0 14px;
}

.fix ol {
  margin: 0;
  padding-left: 20px;
}

.fix li {
  margin-bottom: 9px;
}

/* The card matching the device in hand is marked, so a frustrated person reads the right steps
   first instead of guessing which list is theirs. check.js also moves it directly under the
   heading — `order` would have lifted it above the heading text itself, because the heading and
   the cards are siblings in the same section. */
.fix.is-you {
  border-color: var(--accent);
}

.fix.is-you h3::after {
  content: ' — your device';
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- report ---------- */

.report summary {
  cursor: pointer;
  font-weight: 650;
}

.report pre {
  margin: 12px 0 0;
  padding: 12px;
  background: #0e0e16;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink-dim);
}

.copied {
  color: var(--ok);
}

/* ---------- foot ---------- */

.foot {
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
  margin-top: 22px;
}

.is-hidden {
  display: none !important;
}
