/* Field app styles. Uses variables and components from /assets/app.css. */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
#app { min-height: 100vh; min-height: 100dvh; }
.boot { min-height: 100vh; display: grid; place-items: center; }

.shell { max-width: 560px; margin: 0 auto; padding: 0 var(--gutter) 96px; }
.hdr {
  position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.hdr-in { max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 10px; height: 56px; }
.hdr-title { font-weight: 700; font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  min-width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px; font: inherit; font-size: 15px;
  font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0 8px;
}
.icon-btn:active { background: var(--surface-2); }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good-soft); flex: none; }
.sync-dot.wait { background: var(--warn); } .sync-dot.bad { background: var(--bad); } .sync-dot.off { background: var(--ink-3); }
.badge { background: var(--warn); color: #fff; border-radius: 999px; font-size: 12px; min-width: 20px; height: 20px; line-height: 20px; text-align: center; padding: 0 6px; font-weight: 700; }

/* Home */
.hero { margin-top: 16px; }
.hero-line { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hero-sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 12px 0 6px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }
.bar.done > i { background: var(--good); }
.big-cta { margin-top: 16px; min-height: 64px; font-size: 19px; border-radius: 14px; }
.sync-line {
  margin-top: 12px; width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; font-size: 14px;
  color: var(--ink-2); text-align: left; cursor: pointer;
}
.sync-line .chev { margin-left: auto; color: var(--ink-3); }
.collapsible-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; min-height: 32px; }
.collapsible-head .card-title { margin: 0; flex: 1; }
.copy-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.copy-row code { flex: 1; min-width: 0; background: var(--surface-2); border-radius: 6px; padding: 10px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.steps { margin: 8px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.steps li { margin: 4px 0; }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.visit-row:last-child { border-bottom: 0; }
.visit-row .vn { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-row .vt { font-size: 12px; color: var(--ink-3); }
.tag-unsynced { font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ios-hint { margin-top: 12px; align-items: flex-start; }
.ios-hint button { margin-left: auto; border: 0; background: transparent; font-size: 20px; color: inherit; cursor: pointer; min-width: 32px; min-height: 32px; }

/* Form */
.sec { margin-top: 20px; }
.sec > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; margin: 0 0 10px; }
.sec .card { padding: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.small { min-height: 34px; padding: 0 12px; font-size: 13px; color: var(--ink-2); }
.choices-1 { grid-template-columns: 1fr; }
.choice { min-height: 52px; }
.err { color: var(--bad); font-size: 13px; margin-top: 6px; font-weight: 500; }
.warn-text { color: var(--warn); font-size: 13px; margin-top: 6px; }
.field.has-error .label { color: var(--bad); }
.suggest { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); margin-top: 4px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 10px 12px; min-height: 48px; font: inherit; cursor: pointer; }
.suggest button:last-child { border-bottom: 0; }
.suggest button:active { background: var(--accent-soft); }
.suggest .s1 { font-weight: 600; } .suggest .s2 { font-size: 12px; color: var(--ink-3); }
.followup { margin-top: 8px; }
.gps { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; min-height: 36px; border-radius: 999px; border: 0; font: inherit; font-size: 13px; font-weight: 600; cursor: default; }
.gps.ok { background: var(--good-bg); color: var(--good); }
.gps.wait { background: var(--surface-2); color: var(--ink-2); }
.gps.off { background: var(--bad-bg); color: var(--bad); cursor: pointer; }
.thumbs .thumb-add { cursor: pointer; text-align: center; padding: 4px; line-height: 1.2; }
.thumbs .thumb-add input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.thumbs .thumb { position: relative; }
.thumb .vid-tag { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.thumb.busy { display: grid; place-items: center; }
.submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--border);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
}
.submit-bar-in { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.submit-bar .btn { flex: 1; min-height: 52px; font-size: 17px; }
.sub-block { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 0; min-height: 40px; }

/* Menu / sync lists */
.list-card .row-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.list-card .row-item:last-child { border-bottom: 0; }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t { font-weight: 600; overflow-wrap: anywhere; }
.row-item .s { font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.row-item .e { font-size: 12px; color: var(--bad); overflow-wrap: anywhere; }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); text-align: center; }
.center-screen .card { max-width: 400px; width: 100%; padding: 28px 22px; }
.center-screen .btn + .btn { margin-top: 10px; }
.modal-back { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 60; display: grid; place-items: end center; }
.modal { background: var(--surface); width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
.modal .btn + .btn { margin-top: 10px; }

/* Keep toasts above the sticky submit bar */
#toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
