/* =========================================================
   E-Voting inside the /vote landing card (evoting-landing.js)
   Everything is scoped with .evl- so other landing slides are untouched.
   ========================================================= */

/* ---------- Card: right panel views ---------- */
.voteCarousel .evl-view {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: .35rem;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,.42) rgba(255,255,255,.08);
}
.voteCarousel .evl-view[hidden] { display: none; }
.evl-back {
	display: inline-flex; align-items: center; gap: .3rem;
	margin: 0 0 .55rem; padding: 0; border: 0; background: none;
	color: rgba(255,255,255,.85); font-size: .8rem; font-weight: 600; cursor: pointer;
}
.evl-back:hover { color: #fff; text-decoration: underline; }
.evl-p { margin: 0 0 .7rem; color: rgba(255,255,255,.88); font-size: .88rem; line-height: 1.5; }
.evl-p b { color: #fff; }
.evl-small { font-size: .76rem; color: rgba(255,255,255,.72); }
.evl-label { display: block; margin: 0 0 .3rem; font-size: .8rem; font-weight: 700; color: #fff; }
.evl-input {
	width: 100%; padding: .62rem .75rem; margin-bottom: .7rem;
	border: 1px solid rgba(255,255,255,.35); border-radius: 10px;
	background: #fff; color: #052032; font-size: .95rem;
}
.evl-input:focus { outline: 3px solid rgba(255,193,7,.6); outline-offset: 1px; }
.evl-code {
	font-size: 1.5rem; font-weight: 800; letter-spacing: .45em; text-align: center;
	font-variant-numeric: tabular-nums;
}
.evl-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
	padding: .6rem 1.1rem; border: 0; border-radius: 10px;
	background: #ffc107; color: #052032; font-weight: 800; font-size: .92rem;
	cursor: pointer; text-decoration: none; transition: .15s ease;
}
.evl-btn:hover { filter: brightness(1.05); color: #052032; }
.evl-btn:disabled { opacity: .6; cursor: default; }
.evl-btn-block { width: 100%; }
.evl-btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.evl-btn-ghost:hover { color: #fff; background: rgba(255,255,255,.24); }
.evl-linkbtn { border: 0; background: none; padding: 0; color: #ffe083; font-weight: 700; font-size: .82rem; cursor: pointer; }
.evl-linkbtn:hover { text-decoration: underline; }
.evl-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.evl-msg {
	margin: 0 0 .7rem; padding: .55rem .7rem; border-radius: 10px;
	font-size: .84rem; line-height: 1.45;
	background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25);
}
.evl-msg.err { background: rgba(220,53,69,.28); border-color: rgba(255,160,170,.6); }
.evl-msg.ok { background: rgba(25,135,84,.32); border-color: rgba(140,230,180,.6); }
.evl-msg:empty { display: none; }
.evl-choice {
	display: flex; align-items: center; gap: .55rem; margin-bottom: .45rem;
	padding: .55rem .65rem; border-radius: 10px; cursor: pointer;
	background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: .86rem;
}
.evl-choice input { accent-color: #ffc107; }
.evl-list { display: grid; gap: .45rem; }
.evl-item {
	display: flex; align-items: center; gap: .7rem; width: 100%;
	padding: .6rem .7rem; border-radius: 11px; text-align: left; cursor: pointer;
	background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.2); color: #fff;
}
.evl-item:hover { background: rgba(255,255,255,.2); }
.evl-item-main { flex: 1; min-width: 0; }
.evl-item-title { display: block; font-weight: 700; font-size: .9rem; line-height: 1.25; }
.evl-item-sub { display: block; font-size: .72rem; color: rgba(255,255,255,.75); margin-top: .15rem; }
.evl-pill {
	display: inline-block; padding: .12rem .5rem; border-radius: 999px;
	font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
	background: rgba(255,255,255,.2); color: #fff; white-space: nowrap;
}
.evl-pill.open { background: #16a36a; }
.evl-pill.soon { background: #ffc107; color: #052032; }
.evl-receipt {
	margin: .2rem 0 .8rem; padding: .7rem; border-radius: 12px; text-align: center;
	background: #fff; color: #052032; font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 1.15rem; font-weight: 800; letter-spacing: .08em; word-break: break-all;
}
.evl-steps { margin: 0 0 .6rem; padding-left: 1.1rem; color: rgba(255,255,255,.9); font-size: .84rem; line-height: 1.5; }
.evl-steps li { margin-bottom: .35rem; }
.evl-h4 { margin: .6rem 0 .3rem; font-size: .92rem; font-weight: 800; color: #fff; }
.evl-spin {
	display: inline-block; width: 1rem; height: 1rem; border-radius: 50%;
	border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: evlspin .8s linear infinite;
}
@keyframes evlspin { to { transform: rotate(360deg); } }

/* Keep headings in the card and panel on their own colours (the landing page styles h2/h3 globally) */
.voteCarousel .jobs-resources-heading h3 { color: #fff; }
.evl-ov h2, .evl-ov h3 { color: #052032; }
.evl-dlg h3 { color: #052032; }

/* Left panel status colours */
.voteCarousel .jobs-status.evl-warn { background: #fff4d6; color: #7a5600; }
.voteCarousel .jobs-status.evl-warn .jobs-status-dot { background: #e0a100; box-shadow: 0 0 0 4px rgba(224,161,0,.16); }
.voteCarousel .jobs-status.evl-stop { background: #fdecee; color: #a4202f; }
.voteCarousel .jobs-status.evl-stop .jobs-status-dot { background: #dc3545; box-shadow: 0 0 0 4px rgba(220,53,69,.14); }
.voteCarousel .jobs-status.evl-info { background: #e8f1ff; color: #0b4fb3; }
.voteCarousel .jobs-status.evl-info .jobs-status-dot { background: #0d6efd; box-shadow: 0 0 0 4px rgba(13,110,253,.14); }

/* ---------- Full-screen overlay (ballot and results) ---------- */
body.evl-lock { overflow: hidden; }
.evl-ov {
	position: fixed; inset: 0; z-index: 2000;
	display: flex; flex-direction: column;
	background: #f2f5fa; color: #052032;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.evl-ov-head {
	flex: 0 0 auto; display: flex; align-items: center; gap: .8rem;
	padding: .75rem 1.1rem; color: #fff;
	background: linear-gradient(160deg, #052f62 0%, #0756a8 60%, #0d6efd 100%);
	box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.evl-ov-badge {
	flex: 0 0 auto; padding: .2rem .55rem; border-radius: 999px;
	background: #ffc107; color: #052032; font-size: .7rem; font-weight: 900; letter-spacing: .04em;
}
.evl-ov-title { flex: 1; min-width: 0; }
.evl-ov-title b { display: block; font-size: 1.02rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evl-ov-title span { display: block; font-size: .74rem; color: rgba(255,255,255,.8); }
.evl-ov-x {
	flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3);
	background: rgba(255,255,255,.12); color: #fff; font-size: 1.1rem; cursor: pointer;
}
.evl-ov-x:hover { background: rgba(255,255,255,.25); }
.evl-tabs {
	flex: 0 0 auto; display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 1.1rem;
	background: #fff; border-bottom: 1px solid #dfe6ef; scrollbar-width: thin;
}
.evl-tab {
	flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem;
	padding: .38rem .75rem; border-radius: 999px; border: 1px solid #d3dce8;
	background: #fff; color: #33475b; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.evl-tab.on { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.evl-tab .evl-dot { width: 7px; height: 7px; border-radius: 50%; background: #c3ccd8; }
.evl-tab.done .evl-dot { background: #16a36a; }
.evl-tab.on .evl-dot { background: #fff; }
.evl-ov-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.evl-ov-inner { max-width: 1100px; margin: 0 auto; padding: 1.1rem 1.1rem 1.5rem; }
.evl-pos-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin-bottom: .9rem; }
.evl-pos-head h2 { margin: 0; font-size: 1.45rem; font-weight: 800; }
.evl-pos-head p { margin: .2rem 0 0; color: #5b6b7f; font-size: .9rem; }
.evl-rule {
	display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px;
	background: #e8f1ff; color: #0b4fb3; font-size: .78rem; font-weight: 800;
}
.evl-rule.req { background: #fff4d6; color: #7a5600; }
.evl-search {
	width: 100%; max-width: 320px; margin-left: auto; padding: .5rem .75rem;
	border: 1px solid #cfd8e3; border-radius: 10px; font-size: .9rem;
}
.evl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .85rem; }
.evl-cand {
	position: relative; display: flex; flex-direction: column; overflow: hidden;
	border: 2px solid #e0e7f0; border-radius: 16px; background: #fff; text-align: left;
	padding: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
	color: inherit;
}
.evl-cand:hover { border-color: #9ec5fe; box-shadow: 0 6px 18px rgba(13,110,253,.12); }
.evl-cand:focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
.evl-cand.on { border-color: #0d6efd; box-shadow: 0 0 0 3px rgba(13,110,253,.18); }
.evl-cand-photo { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: #e9eef5; display: block; }
.evl-cand-body { padding: .6rem .7rem .7rem; flex: 1; display: flex; flex-direction: column; }
.evl-cand-name { font-weight: 800; font-size: .95rem; line-height: 1.2; }
.evl-cand-sub { margin-top: .15rem; color: #5b6b7f; font-size: .76rem; line-height: 1.3; }
.evl-cand-tag { margin-top: .35rem; color: #33475b; font-size: .76rem; font-style: italic; line-height: 1.35; }
.evl-cand-foot { margin-top: auto; padding-top: .5rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.evl-cand-pick {
	display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 800; color: #0d6efd;
}
.evl-cand.on .evl-cand-pick { color: #0a58ca; }
.evl-prof {
	border: 0; background: #eef3fa; color: #0b4fb3; border-radius: 8px;
	padding: .22rem .5rem; font-size: .72rem; font-weight: 700; cursor: pointer;
}
.evl-prof:hover { background: #dde8f8; }
.evl-check {
	position: absolute; top: .5rem; right: .5rem; width: 30px; height: 30px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.92); border: 2px solid #c3ccd8; color: transparent; font-size: 1rem; font-weight: 900;
}
.evl-cand.on .evl-check { background: #0d6efd; border-color: #fff; color: #fff; }
.evl-cand.dim { opacity: .55; }
.evl-empty { padding: 1.5rem; text-align: center; color: #5b6b7f; }
.evl-skip {
	display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .75rem .9rem;
	border: 1px dashed #b8c4d4; border-radius: 12px; background: #fff; font-size: .86rem; color: #33475b;
}

.evl-ov-foot {
	flex: 0 0 auto; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
	padding: .7rem 1.1rem calc(.7rem + env(safe-area-inset-bottom)); background: #fff;
	border-top: 1px solid #dfe6ef; box-shadow: 0 -4px 14px rgba(5,32,50,.06);
}
.evl-count { flex: 1; min-width: 150px; font-size: .9rem; font-weight: 700; color: #33475b; }
.evl-count b { color: #0d6efd; font-size: 1.05rem; }
.evl-ob {
	display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
	padding: .62rem 1.15rem; border-radius: 11px; border: 1px solid #cfd8e3; background: #fff;
	color: #052032; font-weight: 800; font-size: .92rem; cursor: pointer;
}
.evl-ob:hover { background: #f3f6fa; }
.evl-ob.pri { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.evl-ob.pri:hover { background: #0b5ed7; }
.evl-ob.go { background: #16a36a; border-color: #16a36a; color: #fff; }
.evl-ob.go:hover { background: #128a5a; }
.evl-ob:disabled { opacity: .55; cursor: default; }

/* Review */
.evl-rev { display: grid; gap: .8rem; }
.evl-rev-card { background: #fff; border: 1px solid #dfe6ef; border-radius: 14px; padding: .85rem 1rem; }
.evl-rev-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.evl-rev-top h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.evl-rev-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.evl-rev-pick { display: flex; align-items: center; gap: .5rem; padding: .3rem .6rem .3rem .3rem; border-radius: 999px; background: #eef3fa; font-weight: 700; font-size: .86rem; }
.evl-rev-pick img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #dfe6ef; }
.evl-rev-none { color: #7a5600; font-size: .86rem; font-weight: 600; }
.evl-rev-bad { color: #a4202f; font-size: .86rem; font-weight: 700; }
.evl-note { margin: 1rem 0 0; padding: .75rem .9rem; border-radius: 12px; background: #fff4d6; color: #5c4200; font-size: .86rem; }

/* Done */
.evl-done { max-width: 520px; margin: 2rem auto; text-align: center; background: #fff; border-radius: 18px; padding: 2rem 1.4rem; border: 1px solid #dfe6ef; }
.evl-done-ico { width: 64px; height: 64px; margin: 0 auto .8rem; border-radius: 50%; background: #16a36a; color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.evl-done h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 .4rem; }
.evl-done p { color: #5b6b7f; font-size: .92rem; }
.evl-done .evl-receipt { background: #eef3fa; font-size: 1.3rem; }

/* Dialog inside the overlay (profile, confirm) */
.evl-dlg-wrap { position: fixed; inset: 0; z-index: 2010; background: rgba(5,32,50,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.evl-dlg { width: min(560px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.evl-dlg-head { display: flex; gap: .9rem; align-items: center; padding: 1.1rem 1.1rem .6rem; }
.evl-dlg-head img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; background: #e9eef5; flex: 0 0 auto; }
.evl-dlg-head h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.evl-dlg-head p { margin: .15rem 0 0; color: #5b6b7f; font-size: .86rem; }
.evl-dlg-body { padding: .3rem 1.1rem 1rem; color: #33475b; font-size: .92rem; line-height: 1.6; white-space: pre-line; }
.evl-dlg-foot { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; padding: .8rem 1.1rem 1.1rem; border-top: 1px solid #eef2f7; }

.evl-toast {
	position: fixed; left: 50%; bottom: 90px; z-index: 2020; transform: translateX(-50%);
	max-width: calc(100vw - 32px); padding: .6rem 1rem; border-radius: 12px;
	background: #052032; color: #fff; font-size: .88rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.evl-ov-err { max-width: 720px; margin: 0 auto 1rem; padding: .7rem .9rem; border-radius: 12px; background: #fdecee; color: #a4202f; font-weight: 700; font-size: .9rem; }
.evl-ov-err:empty { display: none; }

/* Results */
.evl-res { display: grid; gap: 1rem; }
.evl-res-card { background: #fff; border: 1px solid #dfe6ef; border-radius: 16px; padding: 1rem 1.1rem; }
.evl-res-card h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.evl-res-meta { margin: .2rem 0 .8rem; color: #5b6b7f; font-size: .82rem; }
.evl-turn { height: 8px; border-radius: 999px; background: #e9eef5; overflow: hidden; margin: .3rem 0 .8rem; }
.evl-turn i { display: block; height: 100%; background: #16a36a; }
.evl-res-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: .7rem; align-items: center; padding: .45rem 0; border-top: 1px solid #f0f3f8; }
.evl-res-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e9eef5; }
.evl-res-name { font-weight: 700; font-size: .9rem; }
.evl-res-name small { display: block; font-weight: 500; color: #5b6b7f; font-size: .74rem; }
.evl-bar { height: 6px; border-radius: 999px; background: #eef2f7; margin-top: .3rem; overflow: hidden; }
.evl-bar i { display: block; height: 100%; background: #0d6efd; }
.evl-res-row.win .evl-bar i { background: #16a36a; }
.evl-res-votes { font-weight: 800; font-variant-numeric: tabular-nums; }
.evl-win { display: inline-block; margin-left: .35rem; padding: .05rem .4rem; border-radius: 6px; background: #16a36a; color: #fff; font-size: .66rem; font-weight: 800; vertical-align: middle; }

@media (max-width: 575.98px) {
	.evl-ov-head { padding: .6rem .8rem; }
	.evl-ov-badge { display: none; }
	.evl-tabs { padding: .5rem .8rem; }
	.evl-ov-inner { padding: .85rem .8rem 1.2rem; }
	.evl-pos-head h2 { font-size: 1.2rem; }
	.evl-search { max-width: none; margin-left: 0; }
	.evl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
	.evl-cand-body { padding: .5rem .55rem .6rem; }
	.evl-cand-name { font-size: .86rem; }
	.evl-cand-tag { display: none; }
	.evl-ov-foot { padding-left: .8rem; padding-right: .8rem; }
	.evl-count { flex-basis: 100%; min-width: 0; font-size: .85rem; }
	.evl-ov-foot .evl-ob { flex: 1; }
	.evl-dlg-head img { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
	.evl-cand, .evl-btn { transition: none; }
	.evl-spin { animation: none; }
}
