/* votacions.css — estilos de «Votacións» (outubro de 2026). Todo baixo .axn.vt (base en ../axenda/axenda.css) */
.axn.vt { clear: both; margin-top: 35px; padding-top: 14px; }
.vt .axn-wrap { max-width: 1100px; }
.vt .axn-head h1 { font-size: clamp(26px, 3.6vw, 36px); }
.vt-cab-ico { display: inline-flex; width: 30px; height: 30px; vertical-align: -4px; margin-right: 8px; color: var(--verde); }
.vt-cab-ico svg { width: 100%; height: 100%; }
.vt-desc { color: var(--suave); margin: 8px 0 0; max-width: 70ch; white-space: pre-line; }

/* avisos */
.vt-aviso { display: flex; align-items: center; gap: 12px; border-radius: var(--raio); padding: 14px 16px; margin: 0 0 16px; font-weight: 700; }
.vt-aviso svg { width: 22px; height: 22px; flex: none; }
.vt-aviso.ok { background: #E7F4DD; color: #2F5D0E; border: 1px solid #C6E2B0; }
.vt-aviso.mal { background: #FCE8E6; color: #9A2B2B; border: 1px solid #F3C4BE; }
.vt-aviso.info { background: #FFF6D6; color: #6B5600; border: 1px solid #EBDDA0; }

/* ---------- votar (index.php) */
.vt-codigo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.axn .vt-codigo input[type=text] { width: min(320px, 100%); text-align: center; font-size: 26px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 12px; }
.axn .vt-codigo input::placeholder { letter-spacing: .06em; font-weight: 700; font-size: 20px; }
/* todas as opcións co mesmo alto (con e sen imaxe) e centradas */
.vt-opcions { display: grid; grid-template-columns: repeat(auto-fill, 240px); grid-auto-rows: 1fr; justify-content: center; gap: 14px; }
@media (max-width: 560px) { .vt-opcions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vt-opcion .vt-op { min-height: 200px; } }
/* sen height:100% (en modo quirks non funciona): a tarxeta estírase con flex */
.vt-opcion { position: relative; display: flex; flex-direction: column; }
.vt-opcion > label { display: flex; flex-direction: column; flex: 1; cursor: pointer; }
.vt-opcion input { position: absolute; opacity: 0; pointer-events: none; }
.vt-opcion .vt-op { display: flex; flex-direction: column; flex: 1; min-height: 244px; border: 2px solid var(--lina); border-radius: 16px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .1s; }
.vt-opcion:hover .vt-op { border-color: #C4CBD3; }
.vt-opcion input:checked + .vt-op { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(94,138,18,.2); }
.vt-opcion input:focus-visible + .vt-op { outline: 3px solid rgba(94,138,18,.45); outline-offset: 2px; }
.vt-op-img { aspect-ratio: 4 / 3; background: #F2F4F1; display: grid; place-items: center; overflow: hidden; }
.vt-op-img img { width: 100%; height: 100%; object-fit: contain; }
.vt-op-pe { display: flex; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 12px 14px; font-size: 16px; font-weight: 700; flex: 1; min-height: 60px; overflow-wrap: anywhere; }
.vt-op.sen-img .vt-op-pe { flex-direction: column; font-size: 19px; padding: 18px 16px; }
.vt-marca { width: 26px; height: 26px; flex: none; border: 2px solid #C4CBD3; border-radius: 50%; display: grid; place-items: center; background: #fff; transition: all .15s; }
.vt-multiple .vt-marca { border-radius: 7px; }
.vt-marca::after { content: ""; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.vt-opcion input:checked + .vt-op .vt-marca { background: var(--verde); border-color: var(--verde); }
.vt-opcion input:checked + .vt-op .vt-marca::after { opacity: 1; }
.vt-lupa { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.2); display: grid; place-items: center; color: var(--tinta); }
.vt-lupa:hover { color: var(--verde); }
.vt-lupa svg { width: 20px; height: 20px; }
.vt-enviar { display: flex; justify-content: center; margin-top: 6px; }
.vt-enviar .axn-go { width: auto; min-width: 280px; }
.vt-feito { text-align: center; padding: 30px 20px; }
.vt-feito .vt-ok { width: 74px; height: 74px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.vt-feito .vt-ok svg { width: 40px; height: 40px; }
.vt-feito h2 { margin: 0 0 6px; font-size: 22px; }
.vt-feito p { color: var(--suave); margin: 0 0 16px; }

/* ---------- resultados */
.vt-res { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; }
@media (max-width: 760px) { .vt-res { grid-template-columns: 1fr; } }
.vt-barras { display: grid; gap: 10px; }
.vt-barra { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--lina); border-radius: 14px; background: #fff; }
.vt-barra.gana { border-color: var(--c); box-shadow: inset 4px 0 0 var(--c); }
.vt-barra-img { flex: none; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: #F2F4F1; }
.vt-barra-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vt-barra-pto { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin: 0 4px; }
.vt-barra-c { flex: 1; min-width: 0; }
.vt-barra-cab { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.vt-barra-cab b { overflow-wrap: anywhere; }
.vt-barra-cab span { color: var(--suave); font-size: 13px; white-space: nowrap; }
.vt-barra-b { height: 12px; border-radius: 999px; background: #ECEFF2; overflow: hidden; }
.vt-barra-b i { display: block; height: 100%; background: var(--c); border-radius: 999px; transition: width .4s; }
.vt-grafico { text-align: center; }
.vt-donut { width: 100%; max-width: 230px; display: block; margin: 0 auto; }
.vt-donut circle { transition: stroke-dasharray .4s, stroke-dashoffset .4s; }
.vt-donut-n { font: 800 38px "AxNunito", system-ui, sans-serif; fill: var(--tinta); }
.vt-donut-l { font: 700 14px "AxNunito", system-ui, sans-serif; fill: var(--suave); }
.vt-part { color: var(--suave); font-size: 13px; margin: 8px 0 0; }

/* ---------- pé con QR */
.vt-pe { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 22px; }
.vt-qr { display: block; width: 92px; height: 92px; border-radius: 12px; background: #fff; border: 1px solid var(--lina); padding: 6px; }
.vt-qr img { width: 100%; height: 100%; display: block; }
.vt-pilulas { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; }
.vt-pilulas a, .vt-pilulas button, .vt-pil { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--lina);
  color: var(--suave); font: inherit; font-size: 13.5px; font-weight: 400; cursor: pointer; text-decoration: none; line-height: 1.2; }
.vt-pilulas svg, .vt-pil svg { width: 15px; height: 15px; flex: none; }
.vt-pilulas a:hover, .vt-pilulas button:hover, .vt-pil:hover { color: var(--verde); border-color: var(--verde); }
.vt-pil.perigo { color: #9A2B2B; border-color: #E8C4C4; }
.vt-pil.perigo:hover { color: #C62828; border-color: #C62828; background: #FCE4E4; }
.vt-pil.forte { background: var(--verde); border-color: var(--verde); color: #fff; }
.vt-pil.forte:hover { background: #4F7610; color: #fff; }

/* ---------- xestión (admin.php) */
.vt-nova { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; background: var(--verde); color: #fff; font: inherit; font-size: 15px; font-weight: 800; padding: 11px 18px; cursor: pointer; text-decoration: none; }
.vt-nova:hover { background: #4F7610; }
.vt-nova svg { width: 18px; height: 18px; }
.vt-lista { display: grid; gap: 12px; }
.vt-item { background: #fff; border: 1px solid var(--lina); border-radius: var(--raio); padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px; align-items: start; }
@media (max-width: 760px) { .vt-item { grid-template-columns: 1fr; } }
.vt-item h3 { margin: 0; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.vt-item .vt-desc { font-size: 13.5px; margin-top: 4px; }
.vt-etiq { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.vt-etiq span { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #F1F3F5; color: var(--suave); }
.vt-etiq .aberta { background: #E7F4DD; color: #3C6E12; }
.vt-etiq .pechada { background: #FCE8E6; color: #9A2B2B; }
.vt-estado { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 760px) { .vt-estado { align-items: flex-start; } }
.vt-accions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid #EEF0F2; align-items: center; }
.vt-accions form { display: contents; }
/* sen marxe nos formularios (a web vai en modo quirks e daría margin-bottom ao form) */
.vt form { margin: 0; }
.vt-accions form.vt-codigos { display: inline-flex; align-items: center; margin: 0; }
.vt-accions .vt-pil { height: 36px; }
.axn .vt-codigos input[type=number] { height: 36px; }
.vt-codigos { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--suave); }
.axn .vt-codigos input[type=number] { width: 70px; padding: 6px 8px; font-size: 13.5px; }
.vt-baleiro { text-align: center; color: var(--suave); padding: 30px; background: #fff; border: 1px dashed var(--lina); border-radius: var(--raio); }

/* formulario de votación */
.vt-form-op { display: grid; grid-template-columns: 74px minmax(0, 1fr) 36px; gap: 10px; align-items: center; margin-bottom: 10px; }
.vt-mini { position: relative; width: 74px; height: 58px; border-radius: 10px; border: 1.5px dashed #C4CBD3; background: #FAFBFA center / cover no-repeat; display: grid; place-items: center; cursor: pointer; color: var(--tenue); overflow: hidden; }
.vt-mini:hover { border-color: var(--verde); color: var(--verde); }
.vt-mini.con { border-style: solid; border-color: var(--lina); }
.vt-mini.con svg { display: none; }
.vt-mini svg { width: 22px; height: 22px; }
.vt-mini input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.vt-form-op.borrada { display: none; }
.vt-botons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.vt-botons .axn-go { width: auto; padding: 12px 22px; font-size: 16px; }
.vt-cancelar { color: var(--suave); font-weight: 700; text-decoration: none; padding: 10px; }
.vt-cancelar:hover { color: var(--tinta); }

/* xanela de resultados */
.vt-modal { position: fixed; inset: 0; background: rgba(31,41,51,.5); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 9999; overflow-y: auto; }
.vt-modal.on { display: flex; }
.vt-modal-c { position: relative; width: min(980px, 100%); background: var(--fondo); border-radius: 22px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.vt-modal-c h2 { margin: 0 46px 4px 0; font-size: 22px; font-weight: 800; }
.vt-pechar { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; color: var(--suave); }
.vt-pechar:hover { color: var(--tinta); }
.vt-vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--suave); margin-bottom: 16px; }
.vt-vivo i { width: 8px; height: 8px; border-radius: 50%; background: #3FA34D; animation: vt-latexo 1.6s infinite; }
@keyframes vt-latexo { 50% { opacity: .25; } }
