/* Vote details, draw history and agenda refinements */
.ui-icon { width: 1em; height: 1em; flex: 0 0 auto; }
.voter-list { position: relative; }
.voter-trigger { min-width: 0; display: flex; align-items: center; justify-content: flex-end; padding: 2px; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.voter-trigger:focus-visible { outline: 2px solid rgba(255,103,111,.8); outline-offset: 3px; }
.voter-trigger .voter-avatar { pointer-events: none; }
.voter-overflow { width: 25px; height: 25px; display: grid; place-items: center; margin-left: -6px; border: 2px solid #12141a; border-radius: 50%; background: #30333c; color: #ddd; font-size: .45rem; font-weight: 900; }
.voter-detail-label { height: 25px; display: inline-flex; align-items: center; gap: 4px; margin-left: 5px; padding: 0 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.035); color: #b9bbc2; font-size: .5rem; font-weight: 800; white-space: nowrap; }
.voter-trigger:hover .voter-detail-label, .voter-trigger[aria-expanded=true] .voter-detail-label { border-color: rgba(229,9,20,.35); background: rgba(229,9,20,.09); color: #ff969b; }
.voter-popover { position: fixed; z-index: 420; width: min(320px, calc(100vw - 24px)); max-height: min(390px, calc(100vh - 24px)); overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(19,21,27,.98); box-shadow: 0 22px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(229,9,20,.08); color: #fff; pointer-events: none; animation: fade-in .12s ease; backdrop-filter: blur(16px); }
.voter-popover.is-pinned { pointer-events: auto; }
.voter-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(229,9,20,.1), transparent); }
.voter-popover-head > div { display: grid; gap: 2px; }
.voter-popover-head span { color: #ff858b; font-size: .52rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.voter-popover-head strong { font-size: .75rem; }
.voter-popover-head button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.04); color: #fff; cursor: pointer; }
.voter-popover:not(.is-pinned) .voter-popover-head button { display: none; }
.voter-popover-list { max-height: 310px; overflow-y: auto; padding: 6px; }
.voter-popover-row { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 10px; padding: 9px; border-radius: 8px; }
.voter-popover-row + .voter-popover-row { border-top: 1px solid rgba(255,255,255,.055); }
.voter-popover-row .voter-avatar { width: 32px; height: 32px; margin: 0; border-color: #1b1d24; font-size: .55rem; cursor: default; }
.voter-popover-row > span:last-child { min-width: 0; display: grid; gap: 3px; }
.voter-popover-row strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.voter-popover-row time { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: .54rem; }
.vote-bar .button { justify-content: center; }
.vote-bar .button.is-pending { opacity: 1; cursor: progress; }
.vote-spinner { width: 13px; height: 13px; flex: 0 0 13px; margin-left: 7px; border: 2px solid rgba(255,255,255,.28); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.candidate.voted .button-primary:disabled { opacity: 1; cursor: default; }
.vote-count.vote-count-pop { animation: vote-count-pop .62s cubic-bezier(.2,.9,.25,1.35) both; }
.vote-pulse { position: absolute; z-index: 13; inset: 0; border-radius: inherit; pointer-events: none; }
.vote-pulse.increase { animation: vote-card-increase .82s cubic-bezier(.2,.8,.2,1) both; }
.vote-pulse.decrease { animation: vote-card-decrease .72s ease both; }
.vote-feedback { position: absolute; z-index: 14; right: 12px; bottom: 54px; min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.38); font-size: .72rem; font-weight: 950; pointer-events: none; animation: vote-feedback-float .82s cubic-bezier(.18,.82,.25,1) both; }
.vote-feedback.increase { background: linear-gradient(135deg, #16a866, #087947); }
.vote-feedback.decrease { background: linear-gradient(135deg, #ef3d48, #a70c15); }
.vote-feedback.remote { box-shadow: 0 10px 28px rgba(0,0,0,.38), 0 0 0 5px rgba(255,255,255,.06); }

@keyframes vote-card-increase { 0% { box-shadow: 0 0 0 rgba(57,201,139,0); } 38% { box-shadow: inset 0 0 0 2px rgba(57,201,139,.72), 0 0 32px rgba(57,201,139,.28); } 100% { box-shadow: 0 0 0 rgba(57,201,139,0); } }
@keyframes vote-card-decrease { 0% { box-shadow: 0 0 0 rgba(229,9,20,0); } 38% { box-shadow: inset 0 0 0 2px rgba(255,91,100,.68), 0 0 26px rgba(229,9,20,.22); } 100% { box-shadow: 0 0 0 rgba(229,9,20,0); } }
@keyframes vote-count-pop { 0% { opacity: .5; transform: scale(.72); } 48% { color: #fff; transform: scale(1.22); } 100% { opacity: 1; transform: none; } }
@keyframes vote-feedback-float { 0% { opacity: 0; transform: translateY(10px) scale(.65); } 28% { opacity: 1; transform: translateY(-4px) scale(1.08); } 72% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px) scale(.92); } }

.history-draw { border-color: rgba(255,255,255,.1); background: radial-gradient(circle at 100% 0, rgba(229,9,20,.055), transparent 34%), linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); transition: border-color .2s, box-shadow .2s; }
.history-draw:hover, .history-draw[open] { border-color: rgba(229,9,20,.28); box-shadow: 0 12px 34px rgba(0,0,0,.22); }
.history-draw > summary { min-height: 106px; grid-template-columns: minmax(0,1fr) auto auto; gap: 16px; padding: 12px 16px 12px 12px; }
.history-summary-copy { grid-template-columns: 58px minmax(0,1fr); gap: 14px; }
.history-cover { position: relative; width: 58px; height: 80px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: #24272e; color: var(--muted); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.history-cover img { width: 100%; height: 100%; object-fit: cover; }
.history-cover.empty .ui-icon { width: 24px; height: 24px; }
.history-summary-text { min-width: 0; }
.history-kicker { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; color: #ff7f86; font-size: .52rem; font-weight: 850; text-transform: uppercase; }
.history-summary-copy h3 { margin-bottom: 6px; font-size: .91rem; }
.history-summary-copy p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.history-summary-copy p .ui-icon { color: var(--muted-2); }
.history-result { display: inline-flex; align-items: center; gap: 6px; max-width: 250px; padding: 7px 10px; }
.history-result .ui-icon { width: 14px; height: 14px; }
.history-expand { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); white-space: nowrap; }
.history-expand > .ui-icon:first-child { color: #ff7b82; }
.history-chevron { transition: transform .2s; }
.history-draw[open] .history-chevron { transform: rotate(180deg); }

.agenda-card { padding: 0; overflow: hidden; }
.agenda-card .subsection-heading { margin: 0; padding: 19px 20px 15px; border-bottom: 1px solid var(--line); }
#sessionAgenda { display: grid; }
.agenda-section { padding: 14px; }
.agenda-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.agenda-section-head > span, .agenda-history > summary > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; border-radius: 9px; background: rgba(229,9,20,.1); color: #ff838a; }
.agenda-section-head > div, .agenda-history > summary > div { display: grid; gap: 2px; }
.agenda-section-head strong, .agenda-history summary strong { font-size: .7rem; }
.agenda-section-head small, .agenda-history summary small { color: var(--muted); font-size: .53rem; }
.agenda-list { display: grid; }
.agenda-item { grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: 12px; padding: 12px 0; cursor: default; }
.agenda-poster { position: relative; width: 64px; height: 88px; display: block; overflow: hidden; border-radius: 7px; background: #252830; color: inherit; text-decoration: none; }
.agenda-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s, filter .25s; }
.agenda-poster > span { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(6,7,10,.82); color: #fff; opacity: 0; transform: translateY(3px); transition: opacity .2s, transform .2s; }
.agenda-poster:hover img { transform: scale(1.05); filter: brightness(1.08); }
.agenda-poster:hover > span, .agenda-poster:focus-visible > span { opacity: 1; transform: none; }
.agenda-item-copy { min-width: 0; }
.agenda-item-date { display: flex; align-items: center; gap: 5px; color: #ff7f86; font-size: .51rem; font-weight: 850; text-transform: uppercase; }
.agenda-item-date span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.agenda-item h3 { margin: 6px 0 5px; }
.agenda-item h3 a { color: inherit; text-decoration: none; }
.agenda-item h3 a:hover { color: #ff8b91; }
.agenda-session-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 0; border: 0; background: none; color: #d5d6da; font-size: .53rem; font-weight: 800; cursor: pointer; }
.agenda-session-link:hover { color: #ff8b91; }
.agenda-history { border-top: 1px solid var(--line); background: rgba(0,0,0,.14); }
.agenda-history > summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 14px; list-style: none; cursor: pointer; }
.agenda-history > summary::-webkit-details-marker { display: none; }
.agenda-history > summary > span { background: rgba(255,255,255,.045); color: var(--muted); }
.agenda-chevron { color: var(--muted); transition: transform .2s; }
.agenda-history[open] .agenda-chevron { transform: rotate(180deg); }
.past-list { padding: 0 14px 10px; }
.agenda-item.past { grid-template-columns: 48px minmax(0,1fr); opacity: .68; }
.agenda-item.past:hover, .agenda-item.past:focus-within { opacity: 1; }
.agenda-item.past .agenda-poster { width: 48px; height: 68px; filter: grayscale(.38); }
.agenda-empty { margin: 12px 0 2px; padding: 13px; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: .61rem; text-align: center; }

@media (max-width: 700px), (hover: none) {
  .voter-popover { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; max-height: min(430px, calc(100vh - 24px)); border-radius: 16px; pointer-events: auto; }
  .voter-popover:not(.is-pinned) { display: none; }
  .voter-popover-head { padding: 15px 16px; }
  .voter-popover-head button { display: block !important; }
  .voter-popover-row { padding: 11px 9px; }
}

@media (max-width: 560px) {
  .voter-detail-label { padding-inline: 6px; }
  .voter-detail-label .ui-icon { width: 12px; height: 12px; }
  .history-draw > summary { grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 10px; }
  .history-summary-copy { grid-template-columns: 52px minmax(0,1fr); gap: 10px; }
  .history-cover { width: 52px; height: 72px; }
  .history-summary-copy h3 { font-size: .78rem; white-space: normal; }
  .history-summary-copy p { gap: 4px; font-size: .54rem; }
  .history-result { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; max-width: none; }
  .history-expand { grid-column: 2; grid-row: 1; align-self: center; padding: 8px; }
  .history-expand > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .agenda-card { max-height: none; }
  .agenda-item { grid-template-columns: 58px minmax(0,1fr); }
  .agenda-poster { width: 58px; height: 82px; }
}
