/* ===============================
   PneumoTest – styles.css (FULL)
   =============================== */

/* ---------- Base ---------- */
:root {
  --bg-dark: #0b0c10;
  --card-bg: #151722;
  --card-border: #262a3a;
  --text-main: #e8e8ea;
  --text-muted: #b6b7c2;
  --accent: #2f6fed;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ---------- Background Image Support ---------- */
body.bg-on {
  position: relative;
  overflow-x: hidden;
}

body.bg-on::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("images/pneumotest-bg.png") center top / cover no-repeat;
  opacity: 0.22;
  z-index: -2;
}

body.bg-on::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: -1;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}

.top h1 {
  margin: 0;
  font-size: 28px;
}

.sub {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.foot {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

.foot a {
  color: #9bb9ff;
  text-decoration: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

/* ---------- Buttons ---------- */
button {
  font-family: inherit;
}

.primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Forms ---------- */
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

select,
input[type="text"],
input[type="password"] {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #2b2f42;
  background: #0f111a;
  color: var(--text-main);
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Task Screen ---------- */
.task {
  padding: 0;
  overflow: hidden;
}

.taskbar {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
  background: #121423;
  font-size: 14px;
}

/* ---------- Stage (Image Area) ---------- */
.stage {
  position: relative;
  width: 100%;
  height: min(70vh, 720px);
  background: #000;
  display: grid;
  place-items: center;

  /* IMPORTANT: stop iOS long-press / callout */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

/* Chest image */
.stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;

  /* Prevent image context menu */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* ---------- Tap Dot ---------- */
.dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: red;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.dot.hidden {
  display: none;
}

/* ---------- Small UI Bits ---------- */
.small {
  opacity: 0.85;
  font-size: 14px;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #121423;
  border: 1px solid var(--card-border);
}

/* ---------- Admin ---------- */
canvas {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: #000;
}
