/* F07 GOTV (V360-HTML-03C, correction 2). Scoped to the GOTV route and its dialog; shared
 * controls, cards, tables and modals come from base, dashboard and voters styles and are not
 * restyled here. */

/* Status pills (contract colors): Pendiente amber, Movilizado green, En ruta navy. */
.gotv-pill{display:inline-flex;align-items:center;min-height:32px;padding:0 12px;border-radius:var(--radius-full);font:500 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;white-space:nowrap;}
.gotv-pill--pending{color:#855500;background:#fff2d9;}
.gotv-pill--moved{color:#176b46;background:#e7f3ed;}
.gotv-pill--route{color:#14244b;background:#eaf0fb;}

/* Padding, not margin: the page head's bottom margin would collapse a top margin into it. The KPI cards start at y244. */
.gotv-kpis{padding-top:14px;}

/* Chart cards are exactly 680 x 292 at desktop. Positions come from the SVG (card-local), so the
 * cards are not flow-sized: title and subtitle are absolutely placed at the source origins. */
.gotv-chart{position:relative;box-sizing:border-box;height:292px;min-height:0;padding:0;display:block;overflow:hidden;}
.gotv-chart > h3{position:absolute;left:17px;top:17px;margin:0;font:600 16px/22px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink);}
.gotv-chart > .chart-sub{position:absolute;left:17px;top:43px;margin:0;font:400 12px/18px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--muted);}
.gotv-chart__scroll{position:absolute;left:0;top:0;right:0;bottom:0;overflow-x:auto;overflow-y:hidden;}
.gotv-chart__svg{display:block;width:678px;height:290px;}
.gotv-chart__tick,.gotv-chart__label,.gotv-chart__legend{font-family:Inter,ui-sans-serif,system-ui,sans-serif;}
.gotv-chart__tick{font-size:11px;fill:#596579;}
.gotv-chart__label{font-size:12px;fill:#596579;}
.gotv-chart__legend{font-size:13px;fill:#182033;}
.gotv-line__grid{stroke:#e3e8ef;stroke-width:1;}
.gotv-line__point{fill:#14244b;}
@media (prefers-reduced-motion:reduce){
  .gotv-row--revealed td{transition:none;}
}

/* Name targets are 44 px tall inside a 44 px row: no negative margins, so no hit area crosses a row. */
.gotv-name{display:inline-flex;align-items:center;min-height:44px;margin:0;}
.gotv-row--revealed td{background:#eaf0fb;transition:background-color .3s ease;}
.gotv-empty-cell{text-align:left;}

/* Counts, boundary notes and the one-time adjustment notice. */
.gotv-counts{display:grid;gap:6px;margin:0 0 12px;}
.gotv-sample{margin:0;font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink);}
.gotv-visible{margin:0;font:400 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--muted);}
.gotv-boundary{margin:0;color:var(--muted);}
.gotv-adjust-notice{margin:0 17px 10px;padding:10px 12px;color:#14244b;background:#eaf0fb;border-radius:var(--radius-md);font:500 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;}

/* List at 1728 px: an 18 px inner inset, a 1340 px column model (210/180/170/180/180/180/240),
 * a 40 px header, 44 px rows and 32 px status pills. Widths are percentages of 1340 so they scale. */
@media (min-width:861px){
  .gotv-table{table-layout:fixed;width:calc(100% - 36px);margin:0 18px;}
  .gotv-table th{height:40px;padding:0 12px;}
  .gotv-table td{height:44px;padding:0 12px;vertical-align:middle;}
  .gotv-table th:nth-child(1){width:15.6716%;}
  .gotv-table th:nth-child(2){width:13.4328%;}
  .gotv-table th:nth-child(3){width:12.6866%;}
  .gotv-table th:nth-child(4){width:13.4328%;}
  .gotv-table th:nth-child(5){width:13.4328%;}
  .gotv-table th:nth-child(6){width:13.4328%;}
  .gotv-table th:nth-child(7){width:17.9104%;}
}

/* Dialog: 760 px maximum, body scrolls, header and footer stay visible, and 16 px clearance on every
 * edge at all sizes (the shared mobile rule uses 24 px, so it is overridden for this dialog only). */
.modal--gotv{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 32px);}
.modal--gotv:not([open]){display:none;}
/* The dialog is the flex column: header and footer keep their size and only the body scrolls, so a
 * long history, error summary or discard panel never pushes the actions out of the dialog. */
.modal--gotv[open]{display:flex;flex-direction:column;}
.modal--gotv > .modal__head,.modal--gotv > .modal__actions{flex:none;}
.modal--gotv .modal__body{min-height:0;overflow:auto;flex:1 1 auto;}
.modal--gotv > form.gotv-form{flex:1 1 auto;min-height:0;}
.modal--gotv > form.gotv-form > .modal__body{min-height:0;overflow:auto;flex:1 1 auto;}
.modal--gotv > form.gotv-form > .modal__head,.modal--gotv > form.gotv-form > .modal__actions{flex:none;}
.gotv-dialog__head{position:relative;display:grid;gap:4px;padding:18px 64px 12px 20px;}
.gotv-dialog__head h2{margin:0;font:600 20px/28px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink);}
.gotv-dialog__close{position:absolute;top:8px;right:8px;display:inline-grid;place-items:center;width:44px;height:44px;margin:0;padding:0;color:var(--navy-950);background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);font:400 24px/1 Inter,ui-sans-serif,system-ui,sans-serif;cursor:pointer;}
.gotv-dialog__close:focus-visible{outline:2px solid var(--navy-950);outline-offset:2px;}
.gotv-detail__list{display:grid;gap:8px;margin:0 0 16px;}
.gotv-detail__list--compact{margin-bottom:12px;}
.gotv-detail__row{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(0,1.2fr);gap:12px;align-items:center;}
.gotv-detail__row dt{font:600 12px/16px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--muted);text-transform:uppercase;}
.gotv-detail__row dd{margin:0;font:400 15px/22px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink);overflow-wrap:anywhere;}
.gotv-provenance{margin:0 0 16px;color:var(--muted);}
.gotv-history__title{margin:0 0 8px;font:600 14px/20px Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink);}
.gotv-history{list-style:none;margin:0;padding:0;display:grid;gap:12px;}
.gotv-history li{display:grid;gap:2px;}
.gotv-history__empty{margin:0;color:var(--muted);}
.gotv-history__note{margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink);}
.gotv-final{margin:0;color:var(--muted);}
.gotv-detail__actions{justify-content:space-between;flex-wrap:wrap;}
.gotv-form{display:flex;flex-direction:column;min-height:0;}
.gotv-discard{margin-top:12px;padding:12px;background:#fbfbfd;border:1px solid var(--line);border-radius:var(--radius-md);display:grid;gap:10px;}
.gotv-discard[hidden]{display:none;}
.gotv-discard__actions{display:flex;gap:10px;flex-wrap:wrap;}
.gotv-success{display:grid;gap:10px;}
.gotv-success__head{grid-template-columns:auto 1fr;align-items:center;}
.gotv-success__check{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;color:#176b46;background:#e7f3ed;font:700 18px/1 Inter,ui-sans-serif,system-ui,sans-serif;}
.gotv-success__actions{justify-content:space-between;flex-wrap:wrap;}

@media (max-width:860px){
  .modal.modal--gotv{width:calc(100vw - 32px);max-height:calc(100dvh - 32px);}
  .modal.modal--gotv > form,.modal.modal--gotv > div{max-height:calc(100dvh - 32px);}
}
@media (max-width:720px){
  .gotv-detail__row{grid-template-columns:minmax(0,1fr);gap:2px;}
  .gotv-detail__actions .button,.gotv-success__actions .button{width:100%;}
}
