/* Hamburger-menu modals: the "My lists" manager and the list pickers (Share / Create poll).
   The modal frame reuses .poll-modal / .poll-modal-ov; these style the inner content. */

.menu-lists { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 12px; }
/* One tidy line per list: title = open target on the left; count + share + kebab on the right. */
.menu-listrow { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-surface); padding: 8px 10px; background: var(--panel); }
.ml-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 5px 6px; border-radius: var(--r-row); }
.ml-open:hover { background: var(--panel2); }
.ml-chev { margin-left: auto; flex: 0 0 auto; color: var(--dim); font-size: 1.25rem; line-height: 1; padding-left: 6px; }
.ml-open:hover .ml-chev { color: var(--accent2); }
.ml-name { font-size: .98rem; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-active { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 1px 7px; flex: 0 0 auto; }
.ml-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.ml-count { font-size: .8rem; color: var(--muted); background: var(--panel2); border-radius: var(--r-pill); padding: 1px 9px; }
.ml-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-row); cursor: pointer; padding: 0; }
.ml-icon:hover { border-color: var(--accent); }
.ml-icon svg { width: 17px; height: 17px; display: block; }
.ml-kebab { font-size: 1.15rem; line-height: 1; }
/* Kebab overflow menu — styled like the home-page filter popovers. Viewport-FIXED and
   positioned in JS (navmenu.js) so the modal's internal scroll (overflow) can't clip it. */
.ml-menu-wrap { position: relative; }
.ml-menu { position: fixed; z-index: 90; min-width: 152px; display: flex; flex-direction: column; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 6px; box-shadow: 0 12px 34px rgba(0,0,0,.55); }
.ml-menu[hidden] { display: none; }
.ml-mi { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: var(--r-row); padding: 8px 11px; font-size: .85rem; cursor: pointer; text-align: left; white-space: nowrap; }
.ml-mi:hover { border-color: #33415a; color: var(--ink); }
.ml-mi.ml-del:hover { border-color: var(--pink); color: var(--pink); }

/* In-app dialogs (BNM.ui.confirm / prompt) — replace native browser dialogs. */
.ui-modal-ov { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(4,7,12,.72); padding: 20px; }
.ui-modal { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-modal); padding: 22px 22px 18px; box-shadow: 0 22px 60px rgba(0,0,0,.6); }
.ui-title { font-size: 1.1rem; margin: 0 0 8px; color: var(--ink); }
.ui-msg { color: var(--muted); font-size: .92rem; line-height: 1.45; margin: 0 0 16px; }
.ui-input { width: 100%; font-size: .98rem; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-control); padding: 11px 12px; margin-bottom: 16px; }
.ui-input:focus { border-color: var(--accent2); outline: none; }
.ui-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ui-btn { border-radius: var(--r-control); padding: 9px 16px; font-size: .9rem; cursor: pointer; border: 1px solid var(--line); }
.ui-cancel { background: var(--panel2); color: var(--muted); }
.ui-cancel:hover { border-color: var(--accent2); color: var(--ink); }
.ui-primary { background: var(--accent); color: #20150a; font-weight: 700; border-color: var(--accent); }
.ui-primary:hover { filter: brightness(1.05); }
.ui-danger { background: var(--panel2); color: var(--pink); font-weight: 700; border-color: var(--pink); }
.ui-danger:hover { background: var(--pink); color: #fff; }
html.light .ui-modal { color: #1a2230; }

.menu-newlist { width: 100%; }
/* Inline "New list" creator — embedded input replaces the old browser prompt. */
.menu-newwrap { margin-top: 2px; }
.menu-newform { display: flex; flex-direction: column; gap: 8px; }
.menu-newform[hidden] { display: none; }
.menu-newform input { width: 100%; font-size: .95rem; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-control); padding: 11px 12px; }
.menu-newform input:focus { border-color: var(--accent2); outline: none; }
.menu-newform-btns { display: flex; gap: 8px; }
.menu-newform-btns .primary { flex: 1; background: var(--accent); color: #20150a; font-weight: 700; border: 0; border-radius: var(--r-control); padding: 10px 14px; cursor: pointer; }
.menu-newcancel { background: var(--panel2); border: 1px solid var(--line); color: var(--muted); border-radius: var(--r-control); padding: 10px 16px; cursor: pointer; }
.menu-newcancel:hover { border-color: var(--pink); color: var(--ink); }

.menu-picks { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.menu-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-surface); padding: 11px 13px; font-size: .95rem; cursor: pointer; }
.menu-pick:hover { border-color: var(--accent); }
.mp-name { font-weight: 500; }
.mp-count { font-size: .8rem; color: var(--muted); background: var(--panel2); border-radius: var(--r-pill); padding: 1px 9px; }

/* Branded QR — poll + list sharing modals */
.qr-block { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 16px 0 4px; }
.qr-wrap { background: #fff; border-radius: var(--r-modal); padding: 12px; line-height: 0; }
.qr-canvas { width: 200px; height: 200px; display: block; }
.qr-fail { font-size: .85rem; color: var(--muted); padding: 24px; }
.qr-dl { background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-control); padding: 8px 14px; font-size: .85rem; cursor: pointer; }
.qr-dl:hover { border-color: var(--accent); }

/* Poll head-to-head — speaker overlaid in the corner of each choice, above it
   (z-index), so tapping the speaker hears the name instead of casting a vote. */
.poll-side { position: relative; display: flex; flex: 1; min-width: 0; }
.poll-side .poll-choice { width: 100%; }
.poll-speak { position: absolute; top: 8px; right: 8px; z-index: 3; background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-pill); width: 34px; height: 34px; font-size: .9rem; cursor: pointer; line-height: 1; padding: 0; }
.poll-speak:hover { border-color: var(--accent2); background: var(--panel2); }
