/* Canvassing App 3.2 — door card colour grid, grouped outcomes, lasso bulk sheet, crosshair quick-add, Map | List switch. Zero inline styles. Loaded after canvass.css. */

/* ---- door card: big colour grid (top 5), then "More outcomes" grouped ---- */
.lead-menu.doorgrid { display: block; padding: 6px 0 4px; }
.doorgrid .top5 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.doorgrid .top5 .dispo { grid-column: span 2; }
.doorgrid .top5 .dispo:nth-child(n+4) { grid-column: span 3; }
.doorgrid .dispo.top { background: var(--c); border-color: var(--c); color: #fff; min-height: 56px; box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.doorgrid .dispo.top i { font-size: 22px; }
.doorgrid .dispo.top span { font-size: 13px; }
.doorgrid .dispo.top:active { transform: translateY(1px); box-shadow: none; }
.doorgrid .dispo.top.on { outline: 3px solid var(--ink); outline-offset: 1px; }
.doorgrid .dispo.top.on i::after { content: ' ✓'; font-size: 14px; }
.doorgrid .dispo.more-btn { display: flex; flex-direction: row; width: 100%; margin-top: 8px; min-height: 34px; gap: 8px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.doorgrid .dispo.more-btn[aria-expanded="true"] { background: var(--fill); }
.doorgrid .more-groups { display: block; margin-top: 8px; }
.doorgrid .more-groups[hidden] { display: none; }
.grp-tabs { display: flex; gap: 4px; background: var(--soft, var(--fill)); border-radius: 10px; padding: 3px; }
.grp-tab { flex: 1; border: 0; background: none; border-radius: 8px; padding: 7px 2px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.grp-tab b { margin-left: 4px; font-size: 11px; opacity: .65; }
.grp-tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.grp-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 6px; }
.grp-items[hidden] { display: none; }
.doorgrid .grp-items .dispo { flex-direction: row; justify-content: flex-start; gap: 8px; min-height: 42px; padding: 4px 10px; background: var(--surface); border-color: var(--c); color: var(--ink); text-align: left; }
.doorgrid .grp-items .dispo i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.doorgrid .grp-items .dispo span { font-size: 13px; text-align: left; }
.doorgrid .grp-items .dispo.on { background: var(--c); color: #fff; }
.doorgrid .grp-items .dispo.on i { background: var(--surface); color: var(--c); }

/* ---- lasso bulk sheet ---- */
.bulk .bk-break { margin-bottom: 4px; max-height: 26dvh; overflow-y: auto; }
.bk-row { display: grid !important; grid-template-columns: 26px minmax(0, 1.3fr) minmax(0, 1fr) 34px; gap: 8px; }
.bk-row i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; box-shadow: 0 0 0 1.5px #fff, 0 1px 2px rgba(0, 0, 0, .35); }
.bk-row b { flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.bk-row progress { width: 100%; height: 8px; accent-color: var(--c); }
.bk-row span { text-align: right; }
.bk-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0 4px; }
.bk-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 6px 2px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 700; }
.bk-act i { font-style: normal; font-size: 20px; line-height: 1; }
.bk-act span { font-size: 11.5px; line-height: 1.1; text-align: center; }
.bk-act.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.bk-act.danger { color: var(--on-bad); border-color: var(--danger-line); }
.bk-panel:empty { display: none; }
.bk-panel { margin-top: 8px; }
.bk-panel select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: var(--surface); }
.bk-panel .legs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.stops { margin: 0; padding-left: 26px; max-height: 30dvh; overflow-y: auto; font-size: 14px; }
.stops li { padding: 4px 0; } .stops li .status-chip { margin-left: 6px; font-size: 11px; padding: 1px 8px; }
.modal.center { align-items: center; justify-content: center; z-index: 60; }
.modal.center .sheet { border-radius: 16px; max-width: 340px; margin: 0 16px; }

/* ---- crosshair quick-add ---- */
.pill.add { font-size: 24px; line-height: 1; }
.xhair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 7; pointer-events: none; }
.xhair[hidden], .xhair-bar[hidden] { display: none; }
.xhair i { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border: 2.5px solid var(--brand); border-radius: 50%; box-shadow: 0 0 0 2px #fff, inset 0 0 0 2px #fff; }
.xhair i::before, .xhair i::after { content: ''; position: absolute; background: var(--brand); box-shadow: 0 0 0 1px #fff; }
.xhair i::before { left: 50%; top: -12px; bottom: -12px; width: 2px; margin-left: -1px; }
.xhair i::after { top: 50%; left: -12px; right: -12px; height: 2px; margin-top: -1px; }
.xhair-bar { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 12; display: flex; gap: 8px; }
.xhair-bar .btn { flex: 1; padding: 13px 8px; font-size: 16px; font-weight: 700; box-shadow: var(--shadow); }
#view-map:has(.card.open) .xhair-bar { bottom: auto; top: calc(110px + var(--safe-t)); }

/* ---- Map | List switch ---- */
.top-seg { margin: 0; flex: none; }
.top-seg button { padding: 6px 11px; font-size: 13px; }
.topbar .top-seg { background: var(--glass); box-shadow: var(--shadow); border-radius: 999px; padding: 2px; margin-left: auto; margin-right: 92px; }   /* the Me button floats at the right edge */
.topbar .top-seg button { border-radius: 999px; }
.topbar .top-seg button.on { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.viewhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.viewhead h1 { flex: 1 1 auto; }
.viewhead .muted { order: 3; flex: 1 0 100%; margin: 0; }
.in-list { order: 2; }

/* the card never grows past the map: it scrolls; with the outcome groups open the secondary lines step aside so the pin stays in view */
#card { max-height: calc(100% - 56px); overflow-y: auto; overscroll-behavior: contain; }
#card:has(#more-row:not([hidden])) #card-note-form, #card:has(#more-row:not([hidden])) #card-today, #card:has(#more-row:not([hidden])) #card-last, #card:has(#more-row:not([hidden])) #card-meta { display: none; }
