/* Web/public/style.css — dark, utilitarian, high contrast, matching the
   app's search-and-rescue style. */
:root {
  --bg: #0b0d0c;
  --fg: #e8ece9;
  --accent: #ffb000;
  --dim: #8a938c;
  --card: #141715;
  --border: #2a2e2b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.bar h1 {
  font-size: 1.05rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tab {
  background: none;
  border: 1px solid var(--border);
  color: var(--dim);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.tab[aria-current="page"] {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px 16px;
}

section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

section[hidden] {
  display: none;
}

.banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.4;
}

.banner.warn { border-color: var(--accent); color: var(--accent); }

.camera-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.camera-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.aim-ring {
  position: absolute;
  width: 60px;
  height: 60px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.aim-ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
}

.primary {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 1rem;
}

button {
  font-family: inherit;
}

.live-line {
  margin-top: 12px;
  min-height: 1.4em;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.messages {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.messages li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.messages li .text {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.messages li.pending .text {
  color: var(--dim);
  font-style: italic;
}

.messages li .meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--dim);
}

.messages li .actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.messages li .actions button, .messages li .actions a {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.85rem;
  text-decoration: none;
}

.field {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--dim);
}

.field input {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 8px;
  padding: 12px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.unsendable {
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.85rem;
}

.speeds {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.speeds button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
}

.speeds button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.blink {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10;
}

.blink.lit {
  background: #fff;
}

.tip {
  margin-top: 12px;
  color: var(--dim);
  font-size: 0.85rem;
  line-height: 1.4;
}

footer {
  text-align: center;
  padding: 10px;
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--dim);
  font-size: 0.85rem;
  text-decoration: none;
}

@media (max-width: 375px) {
  main { padding: 0 16px 16px; }
}

#offline-status {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 0.75rem;
}
#offline-status[hidden] { display: none; }

.details { margin: 8px 0; color: var(--dim); font-size: 0.75rem; }
.details summary { cursor: pointer; }
.details-line { font-family: ui-monospace, Menlo, monospace; overflow-wrap: anywhere; margin: 6px 0; }
