/* Sdílené prvky seznamu odpovědí / diváků (core/answers.js) pro Gambu i Anketu — lišta nad polem i admin panel.
   Sdílené addonem i webem (OBS ne). Tmavé pozadí. Barevný akcent dává hostitel na svém kořeni proměnnými
   `--an-accent` (gamba #9147ff, anketa #3aa0ff) a `--an-accent-2` (světlejší text), barvu řádku `--an-c` / `--an-c2`
   v atributu style; bez hostitele platí záložní fialová. */

/* Divák: logo platformy (účet UnityChat zlaté) + jméno v barvě z chatu; odpověď: text v barvě palety. */
.uc-an-who { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; vertical-align: bottom; }
.uc-an-nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-an-pls { display: inline-flex; gap: 2px; flex: none; }
.uc-an-pls .uc-an-pi { width: 12px; height: 12px; }
.uc-an-pi { flex: none; display: inline-block; width: 14px; height: 14px; vertical-align: -2px; background: center / contain no-repeat; }
.uc-an-pi.tw { background-image: url('icons/platform/twitch.svg'); }
.uc-an-pi.ki { background-image: url('icons/platform/kick.svg'); }
.uc-an-pi.yt { background-image: url('icons/platform/youtube.svg'); }
.uc-an-pi.uc.tw { background-image: url('icons/platform/twitch-gold.svg'); }
.uc-an-pi.uc.ki { background-image: url('icons/platform/kick-gold.svg'); }
.uc-an-pi.uc.yt { background-image: url('icons/platform/youtube-gold.svg'); }
.uc-an-pi.uc { filter: drop-shadow(0 0 3px rgba(255, 140, 0, .45)); }

/* Seznam v liště (Na diváka / Otevřené): až 30 řádků, vidět výchozích 10 (10 × 30 px + mezery), dál posuvník uvnitř
   lišty. Pravidlo UC: žádný `scrollbar-width` na prvku (Chrome by vykreslil systémový posuvník), jen barva palce +
   fallback pro prohlížeče bez ::-webkit-scrollbar. */
.uc-an-list.scroll { max-height: var(--uc-an-list-h, 336px); overflow-y: auto; padding-right: 2px; }
.uc-an-list.scroll::-webkit-scrollbar-thumb, .uc-an-rows::-webkit-scrollbar-thumb, .uc-an-popopts::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--an-accent, #9147ff) 55%, transparent); }
.uc-an-list.scroll::-webkit-scrollbar-thumb:hover, .uc-an-rows::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--an-accent-2, #c9a6ff) 85%, transparent); }
@supports not selector(::-webkit-scrollbar) { .uc-an-list.scroll, .uc-an-rows { scrollbar-color: color-mix(in srgb, var(--an-accent, #9147ff) 55%, transparent) transparent; } }
/* Úchyt na horní hraně lišty (ukáže se při najetí na rodiče): tažením výška seznamu 100–660 px, lišta roste nahoru do chatu. */
.uc-an-grip { position: absolute; left: 0; right: 0; top: -4px; height: 10px; cursor: ns-resize; z-index: 3; touch-action: none; }
.uc-an-grip::after { content: ''; position: absolute; left: 50%; top: 3px; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: transparent; transition: background .15s ease; }
:hover > .uc-an-grip::after, .uc-an-grip.dragging::after { background: color-mix(in srgb, var(--an-accent-2, #c9a6ff) 60%, transparent); }
.uc-an-resizing { user-select: none; -webkit-user-select: none; }
.uc-an-resizing .uc-an-list.scroll { transition: none; }

/* Hledání: pole s lupou + našeptávač pod ním. */
.uc-an-findwrap { display: flex; flex-direction: column; }
.uc-an-find { position: relative; margin-top: 7px; }
.uc-an-find input {
  width: 100%; box-sizing: border-box; padding: 6px 9px 6px 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .16);
  background: #0e0e10; color: #efeff1; font: inherit; font-size: 12.5px; outline: none;
}
.uc-an-find input:focus { border-color: var(--an-accent, #9147ff); }
.uc-an-find input::placeholder { color: #6e6e78; }
.uc-an-find .uc-pl-in { width: 100%; padding-left: 28px; font-size: 12px; }
.uc-an-find::before { content: ''; position: absolute; left: 9px; top: 50%; width: 12px; height: 12px; margin-top: -7px; border: 2px solid #adadb8; border-radius: 50%; box-sizing: border-box; pointer-events: none; }
.uc-an-find::after { content: ''; position: absolute; left: 18px; top: 50%; width: 6px; height: 2px; margin-top: 3px; background: #adadb8; transform: rotate(45deg); transform-origin: left center; pointer-events: none; }
.uc-an-find:has(.uc-an-sug:not([hidden]))::before, .uc-an-find:has(.uc-an-sug:not([hidden]))::after { top: 17px; }
.uc-an-sug {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 3; margin-top: 3px; padding: 4px; max-height: 190px; overflow-y: auto;
  border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: #18181b; box-shadow: 0 8px 22px rgba(0, 0, 0, .55);
}
.uc-an-sug[hidden] { display: none; }
.uc-an-sug-i { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.uc-an-sug-i.on, .uc-an-sug-i:hover { background: color-mix(in srgb, var(--an-accent, #9147ff) 18%, transparent); }
.uc-an-sl { margin-left: auto; color: #adadb8; font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }
.uc-an-sug-i.dup { outline: 1px solid rgba(255, 179, 71, .6); }
.uc-an-sug-i.dup .uc-an-sl { color: #ffb347; font-weight: 700; }
.uc-an-sug-i.dis { opacity: .55; cursor: not-allowed; }
.uc-an-sug-i.dis .uc-an-sl { color: #ff8a8a; font-weight: 700; }
.uc-an-sug-i.dis:hover { background: none; }
/* Otevřené: trvalé upozornění nad polem + „Přidat vlastní odpověď „…““ (zašedlé při shodě / vlastní už má / 30). */
.uc-an-warn { margin-top: 7px; display: flex; gap: 8px; align-items: flex-start; border: 1px solid rgba(255, 179, 71, .5); background: rgba(255, 179, 71, .08); color: #ffd39a; border-radius: 8px; padding: 7px 9px; font-size: 12px; }
.uc-an-warn b { color: #ffb347; }
.uc-an-warn svg { flex: none; width: 15px; height: 15px; color: #ffb347; margin-top: 1px; }
.uc-an-own { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.uc-an-own[hidden] { display: none; }
.uc-an-hint { color: #adadb8; font-size: 11.5px; flex: 1 1 120px; min-width: 0; }
.uc-an-ghost { border: 1px dashed rgba(255, 255, 255, .3); border-radius: 7px; padding: 4px 10px; background: none; color: #efeff1; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-an-ghost:hover:not(:disabled) { border-color: rgba(255, 255, 255, .55); }
.uc-an-ghost:disabled { opacity: .4; cursor: default; }
/* Koncept výběru nad polem: „Sázíš na …“ / „Hlasuješ pro …“ / „Nová odpověď „…““ (bez křížku, jiný výběr ho nahradí). */
.uc-an-pickline-wrap[hidden] { display: none; }
.uc-an-pickline { margin-top: 6px; font-size: 12px; color: #adadb8; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.uc-an-pickline b { color: #efeff1; }
.uc-an-pickline .uc-an-who { margin: 0 2px; }

/* ---- Správa (admin panel): řádky odpovědí, ikonová tlačítka, lišta slučování, dialog, karta ve velkém ---- */
/* Ikonové tlačítko (⤢, pohárek, šipka, koš, oko). */
.uc-an-ib { flex: none; width: 24px; height: 22px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 5px; background: rgba(255, 255, 255, .04); color: #adadb8; display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit; font-size: 12px; line-height: 1; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.uc-an-ib:hover:not(:disabled) { color: #efeff1; background: rgba(255, 255, 255, .1); }
.uc-an-ib svg { width: 13px; height: 13px; }
.uc-an-ib.del.uc-armed, .uc-an-ib.hide.uc-armed { background: #b3261e; border-color: #ff6b6b; color: #fff; }
.uc-an-ib:disabled { opacity: .5; cursor: default; }
.uc-an-ib:focus-visible { outline: 2px solid var(--an-accent, #9147ff); outline-offset: 2px; }
/* Textové tlačítko lišty slučování a dialogu (`.ok` = akcent). */
.uc-an-btn {
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px; padding: 3px 8px;
  background: rgba(255, 255, 255, .05); color: #efeff1; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.uc-an-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.uc-an-btn:active:not(:disabled) { transform: translateY(1px); }
.uc-an-btn:disabled { opacity: .5; cursor: default; }
.uc-an-btn.ok { border-color: transparent; background: linear-gradient(135deg, color-mix(in srgb, var(--an-accent, #9147ff) 78%, #fff), var(--an-accent, #9147ff)); color: #fff; }
/* Řádky odpovědí v kartě moda: proužek v barvě, text, počet, ikony; nejvýš 10 řádků (max-height 336 px) + posuvník
   v akcentu; přeskupení FLIP (core flipReplace). */
.uc-an-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; max-height: 336px; overflow-y: auto; padding-right: 2px; }
.uc-an-r { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); font-size: 12px; overflow: hidden; touch-action: pan-y; transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.uc-an-r::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--an-c), var(--an-c2, var(--an-c))); pointer-events: none; }
[data-kind="open"] .uc-an-rows .uc-an-r { cursor: grab; }
.uc-an-rt { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-an-rt .uc-an-who { max-width: 100%; }
.uc-an-rby { color: #adadb8; font-weight: 500; font-size: 11px; }
.uc-an-rc { flex: none; color: #adadb8; font-size: 11px; font-variant-numeric: tabular-nums; }
.uc-an-r.pre .uc-an-rt::after { content: ' · předepsaná'; color: #adadb8; font-weight: 500; font-size: 11px; }
.uc-an-r.src { border-color: var(--an-accent, #9147ff); box-shadow: inset 0 0 0 1px var(--an-accent, #9147ff); }
.uc-an-r.src .uc-an-rc::after { content: ' · slučuji…'; color: var(--an-accent-2, #c9a6ff); font-weight: 700; }
.uc-an-r.target { cursor: pointer; }
.uc-an-r.target:hover { background: color-mix(in srgb, var(--an-accent, #9147ff) 18%, transparent); border-color: color-mix(in srgb, var(--an-accent, #9147ff) 60%, transparent); }
.uc-an-r.target .uc-an-ib { visibility: hidden; }
.uc-an-r.target .uc-an-rc::after, .uc-an-r.drop .uc-an-rc::after { content: ' ← sem'; color: var(--an-accent-2, #c9a6ff); font-weight: 700; }
.uc-an-r.dragging { z-index: 5; cursor: grabbing; box-shadow: 0 10px 24px rgba(0, 0, 0, .55); background: #26262c; transition: none; }
.uc-an-r.drop { border-color: var(--an-accent, #9147ff); box-shadow: inset 0 0 0 1px var(--an-accent, #9147ff), 0 0 10px color-mix(in srgb, var(--an-accent, #9147ff) 35%, transparent); background: color-mix(in srgb, var(--an-accent, #9147ff) 20%, transparent); }
.uc-an-r.fhide { display: none; }
.uc-an-mergebar { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; color: var(--an-accent-2, #c9a6ff); font-weight: 700; flex-wrap: wrap; }
.uc-an-mergebar[hidden] { display: none; }
.uc-an-mergebar .uc-an-btn { margin-left: auto; }
.uc-an-mt { color: #efeff1; }
/* Dialog / samostatné okno „ve velkém“: hlavička a fulltext pevně, posouvá se jen seznam, tlačítka přišpendlená dole. */
.uc-an-popwrap { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .62); display: grid; place-items: center; padding: 16px; }
.uc-an-pop { width: min(680px, 100%); max-height: 90vh; box-sizing: border-box; overflow: hidden; background: #18181b; border: 1px solid color-mix(in srgb, var(--an-accent, #9147ff) 70%, transparent); border-radius: 12px; padding: 14px 16px 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 24px color-mix(in srgb, var(--an-accent, #9147ff) 20%, transparent); display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #efeff1; outline: none; }
.uc-an-pop.ext { width: auto; height: 100%; max-height: none; box-shadow: none; }
.uc-an-ptop { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 800; flex: none; }
.uc-an-ptop .uc-pl-hq { flex: 1 1 auto; }
.uc-an-ptop .uc-pl-left { font-size: 13px; }
.uc-an-pclose { margin-left: auto; background: none; border: 0; color: #adadb8; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; flex: none; }
.uc-an-pclose:hover { color: #efeff1; }
.uc-an-pfind { display: flex; align-items: center; gap: 8px; margin: 2px 0; flex: none; }
.uc-an-pfind .uc-pl-in { flex: 1; font-size: 13px; }
.uc-an-pcount { flex: none; font-size: 11.5px; color: #adadb8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.uc-an-popopts { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 2px; }
.uc-an-pop .uc-an-rows { max-height: none; overflow: visible; }
.uc-an-pop .uc-an-r { padding: 6px 8px 6px 12px; }
.uc-an-pop .uc-an-rt { font-size: 13px; }
.uc-an-pop .uc-an-rc { font-size: 12px; }
.uc-an-pop .uc-an-ib { width: 28px; height: 24px; }
.uc-an-pop .uc-an-ib svg { width: 14px; height: 14px; }
.uc-an-popacts { flex: none; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--an-accent, #9147ff) 25%, transparent); }
.uc-an-pop .uc-an-btn { font-size: 12.5px; padding: 5px 11px; }
.uc-an-pop .uc-an-mergebar { font-size: 12.5px; }
/* Potvrzení sloučení: zdroj → cíl v barvách s počty, věta o přesunu, nevratnost; v dokumentu, kde karta je. */
.uc-an-cfm { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .62); display: grid; place-items: center; padding: 16px; }
.uc-an-cfm-box { width: min(460px, 100%); box-sizing: border-box; background: #18181b; border: 1px solid color-mix(in srgb, var(--an-accent, #9147ff) 70%, transparent); border-radius: 12px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7), 0 0 24px color-mix(in srgb, var(--an-accent, #9147ff) 20%, transparent); font-size: 13px; color: #efeff1; }
.uc-an-cfm-box h5 { margin: 0; font-size: 14px; font-weight: 800; }
.uc-an-cfm-row { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 9px 7px 13px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); overflow: hidden; }
.uc-an-cfm-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--an-c); }
.uc-an-cfm-row .uc-an-rt { font-weight: 800; white-space: normal; overflow-wrap: anywhere; }
.uc-an-cfm-row .uc-an-rc { font-size: 12px; }
.uc-an-cfm-row.src { opacity: .85; }
.uc-an-cfm-row.dst { border-color: color-mix(in srgb, var(--an-accent, #9147ff) 60%, transparent); }
.uc-an-cfm-arrow { text-align: center; color: var(--an-accent-2, #c9a6ff); font-weight: 800; font-size: 12px; letter-spacing: .04em; }
.uc-an-cfm-txt { font-size: 12.5px; color: #adadb8; margin: 0; }
.uc-an-cfm-txt b { color: #efeff1; }
.uc-an-cfm-txt .warn { color: #ffb347; font-weight: 700; }
.uc-an-cfm-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 2px; }
.uc-an-cfm .uc-an-btn { font-size: 12.5px; padding: 5px 12px; }
@media (prefers-reduced-motion: reduce) { .uc-an-btn, .uc-an-ib, .uc-an-r { transition: none; } .uc-an-btn:active:not(:disabled) { transform: none; } }

/* Odkaz v otázce / odpovědi / názvu (emoteTextHtml → renderer chatu): barva jako odkazy v chatu (.msg .tx a), ne modrá
   prohlížeče — lišta i karta výsledku Ankety, Gamby a Točky, admin panel. */
:is(.uc-poll, .uc-poll-result, .uc-pl-hi, .uc-pl-adm, .uc-gb, .uc-gb-result, .uc-gw, .uc-an-pop) a { color: #e8b84b; text-decoration: none; overflow-wrap: anywhere; }
:is(.uc-poll, .uc-poll-result, .uc-pl-hi, .uc-pl-adm, .uc-gb, .uc-gb-result, .uc-gw, .uc-an-pop) a:hover { text-decoration: underline; }
