/* Co-Help mobile web app (/app). Builds on app.css (shared with /app/pair). */

[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

a { color: #a5b4fc; }
a:hover { color: #c7d2fe; }

.screen { display: flex; flex-direction: column; gap: 16px; }
.title { font-size: 26px; line-height: 1.2; font-weight: 700; }
.lede { color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
}
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
button:focus-visible, a:focus-visible, .mode:focus-within {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.btn-primary, .btn-secondary, .btn-ghost, .btn-end {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { border: none; background: var(--accent); color: #fff; min-height: 54px; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { border: 1px solid var(--border); background: #232c3d; color: var(--text); }
.btn-ghost { border: none; background: transparent; color: #cbd5e1; min-height: 44px; font-size: 15px; font-weight: 500; padding: 0 10px; }
.btn-end { min-height: 44px; border-radius: 22px; border: 1px solid #7f1d1d; background: #2a1318; color: #fecaca; font-size: 14px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tabs button { min-height: 44px; border: none; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #232c3d; color: var(--text); }

.modes { border: none; display: flex; flex-direction: column; gap: 10px; }
.modes legend { margin-bottom: 10px; }
.mode {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.mode:has(input:checked) { border: 2px solid var(--accent); padding: 13px 15px; }
.mode input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.mode > span { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.mode .muted { font-size: 13px; line-height: 1.45; }
.mode-link { color: var(--text); }
.mode-link:hover { color: var(--text); }

.docs { display: flex; flex-direction: column; gap: 10px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 14px; overflow-wrap: anywhere; }

/* Live */
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-text { display: flex; flex-direction: column; min-width: 0; }
.live-state { font-weight: 600; font-size: 15px; }
.live-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.rec-dot.on { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); }
.hearing { color: var(--muted); font-size: 14px; font-style: italic; overflow-wrap: anywhere; }
.say .answer { font-size: 19px; }

#screenLive { padding-bottom: 150px; }
.live-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #1f2838;
  background: #0c111b;
}
.btn-listen { width: 100%; }
.btn-listen[aria-pressed="true"] { background: #232c3d; border: 1px solid var(--border); }
.ask { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 4px 4px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ask input { flex: 1 1 auto; min-width: 0; border: none; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.btn-send { width: 44px; height: 40px; border: none; border-radius: 10px; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Consent bottom sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(7, 10, 18, 0.8); }
.sheet {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  background: var(--surface);
}
.sheet-title { font-size: 22px; font-weight: 700; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; color: #cbd5e1; }
.sheet-body strong { color: var(--text); }
.consent-check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: #232c3d; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent-check input { width: 22px; height: 22px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--accent); }

@media (min-width: 700px) { .live-bar { left: 50%; right: auto; width: 640px; transform: translateX(-50%); } }
