/* The Spark model-swap Mini App (COWORK-MESH-001 CW6g1).
 *
 * COLOURS COME ONLY FROM TELEGRAM'S THEME VARIABLES, each with a fallback: the same page must read
 * correctly in Telegram's light theme, its dark theme, and in a plain browser when the web-app
 * script has not set them. No literal colour is used anywhere except those fallbacks.
 */

:root {
  color-scheme: light dark;
}

body {
  margin: 0;
  padding: 16px 16px 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  background: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #111111);
}

h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--tg-theme-text-color, #111111);
}

h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 20px 0 8px;
  color: var(--tg-theme-hint-color, #6b7280);
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--tg-theme-text-color, #111111);
}

p {
  margin: 0 0 6px;
}

.notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--tg-theme-secondary-bg-color, #f3f4f6);
  color: var(--tg-theme-text-color, #111111);
  font-size: 14px;
}

.notice.bad {
  color: var(--tg-theme-destructive-text-color, #b42318);
}

.menu,
.requests {
  display: block;
}

/* "Now running" - the answer to the first question on the phone. It reads as one statement about
 * the boxes, so it is set apart from the switch menu by a rule and a tinted background, and its
 * live load and pin lines are quieter than the model name. */
.now-running {
  display: block;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tg-theme-secondary-bg-color, #f3f4f6);
  border: 1px solid var(--tg-theme-hint-color, #e5e7eb);
}

.now-running h2 {
  margin: 0 0 8px;
}

.now-running .load,
.now-running .pinned {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #6b7280);
}

.now-running .pinned {
  color: var(--tg-theme-link-color, #2f6fed);
}

/* The pair's lock is the ordinary state, not a fault: a quiet line, never the destructive colour. */
.locked {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #6b7280);
}

.host-group {
  margin: 0 0 12px;
}

.card {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tg-theme-secondary-bg-color, #f3f4f6);
  border: 1px solid var(--tg-theme-hint-color, #e5e7eb);
}

.card.request {
  border-left: 3px solid var(--tg-theme-button-color, #2f6fed);
}

.label {
  color: var(--tg-theme-text-color, #111111);
}

.verdict {
  font-size: 14px;
  color: var(--tg-theme-hint-color, #6b7280);
}

.eta,
.approval {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #6b7280);
}

.approval {
  color: var(--tg-theme-link-color, #2f6fed);
}

button {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--tg-theme-button-color, #2f6fed);
  color: var(--tg-theme-button-text-color, #ffffff);
}

button.secondary {
  background: var(--tg-theme-secondary-bg-color, #e5e7eb);
  color: var(--tg-theme-text-color, #111111);
  border: 1px solid var(--tg-theme-hint-color, #9ca3af);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

.empty {
  color: var(--tg-theme-hint-color, #6b7280);
  font-size: 14px;
}
