/* M3 prototype styles (M3-U1). Built on ../shared/tokens.css; nothing here needs the network. */

/* facilitator strip: the offline switch is in the flow, not floating over the header */
.facilitator { display: flex; justify-content: flex-end; margin-bottom: var(--sp-2); }
#offline-toggle { background: var(--surface-raised); border: 1px solid var(--border-default); color: var(--text-primary); font-size: 0.85rem; font-weight: 500; min-height: 44px; }
.has-action main { padding-bottom: 96px; }
.has-action { padding-bottom: 0; }

/* tappable cards and rows */
button.card, a.card { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 44px; text-align: left; color: var(--text-primary); font: inherit; font-weight: 400; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.grow { flex: 1; min-width: 0; }
.name { font-weight: 600; overflow-wrap: anywhere; }
.big { font-size: 2rem; font-weight: 700; line-height: 1.3; }
.huge { font-size: 2.25rem; font-weight: 700; line-height: 1.3; }
.muted { color: var(--text-secondary); }
.nowrap { white-space: nowrap; }
.chev { color: var(--text-secondary); font-size: 1.2rem; }
.stack > * + * { margin-top: var(--sp-3); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-1) var(--sp-4); margin: 0; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

/* tags: tinted background, dark text and a symbol, so no colour is used alone and contrast stays high */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; color: var(--text-primary); border: 1px solid var(--border-strong); background: var(--surface-subtle); }
.tag-ok { background: color-mix(in srgb, var(--success-base) 16%, var(--surface-raised)); }
.tag-bad { background: color-mix(in srgb, var(--danger-base) 16%, var(--surface-raised)); }
.tag-warn { background: color-mix(in srgb, var(--warning-base) 22%, var(--surface-raised)); }
.tag-info { background: color-mix(in srgb, var(--info-base) 16%, var(--surface-raised)); }
.banner { color: var(--text-primary); }
.banner-offline, .banner-error, .banner-info { color: var(--text-primary); }
.error-text { color: var(--text-primary); }
.error-text .ico { color: var(--danger-base); }

/* segmented choices: every segment is its own 44 x 44 target */
.seg-group { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.seg-group button { min-width: 44px; min-height: 44px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text-primary); font-weight: 500; }
.seg-group button[aria-pressed="true"] { background: var(--primary-base); color: var(--primary-fg); border-color: var(--primary-base); font-weight: 700; }
.chip { min-height: 44px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text-primary); border-radius: 999px; font-weight: 500; padding: 0 var(--sp-4); }
.chip[aria-pressed="true"] { background: var(--primary-base); color: var(--primary-fg); border-color: var(--primary-base); }
.check { display: flex; align-items: flex-start; gap: var(--sp-3); min-height: 44px; font-weight: 400; }
.check input { width: 24px; height: 24px; margin: 10px 0 0; flex-shrink: 0; }
.check span { padding-top: 8px; }
.switch-row { display: flex; align-items: center; gap: var(--sp-3); }

/* bottom sheets (native dialog) */
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; box-sizing: border-box; border: 0; border-radius: 16px 16px 0 0; padding: var(--sp-4); padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)); background: var(--surface-base); color: var(--text-primary); max-height: 85vh; overflow-y: auto; font-family: inherit; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog.sheet .sheet-actions { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-4); }

/* screens and states */
[hidden] { display: none !important; }
.screen:focus { outline: none; }
h2[tabindex="-1"]:focus { outline: none; }
.skel-line { height: 56px; margin-bottom: var(--sp-3); }
.bars > div { display: flex; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border-default); }
.search { margin-bottom: var(--sp-3); }
.struck { text-decoration: line-through; }
.lobby-note { margin-top: var(--sp-4); }

/* the shared stylesheet styles text, tel, number, textarea and select; password fields need it too */
input[type="password"] { width: 100%; min-height: 44px; font-family: inherit; font-size: 1rem; padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); border: 1px solid var(--border-default); background: var(--surface-base); color: var(--text-primary); }
input[type="password"]:focus { outline: 3px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
input[type="password"][aria-invalid="true"] { border-color: var(--danger-base); }
