.pnfoa-pf-app,.pnfoa-vote{max-width:1200px;margin:1rem auto;font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:#1f2937}

.pnfoa-vote__header{margin:1rem 0}.pnfoa-vote__header p{color:#667085}

.pnfoa-vote__header h2 {
  margin: 0 0 6px;
}

.pnfoa-vote-instructions{padding:1rem;border:1px solid #ddd;border-radius:8px;background:#fafafa;margin-top:1rem}.pnfoa-vote-instructions p{margin:.35rem 0 0;color:#374151}

.pnfoa-position{background:#fff;border:1px solid #ddd;border-radius:8px;margin:.75rem 0;padding:1rem}

.pnfoa-position h3 {
  font-size: 20px;
  margin: 0 0 14px;
}

.pnfoa-position h4{color:#374151;font-size:1rem;margin:0 0:.5rem}

.pnfoa-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  gap: 20px;
}

.pnfoa-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.pnfoa-candidate,.pnfoa-actions button{border:1px solid #bbb;background:#f7f7f7;border-radius:6px;color:#1f2937;cursor:pointer;padding:.55rem .8rem;text-align:left;width:100%}

.pnfoa-candidate:disabled{opacity:.5;cursor:not-allowed}

.pnfoa-ranking{min-height:180px;border:1px solid #ddd;border-radius:8px;background:#fafafa;padding:.75rem .75rem .75rem 2rem}

.pnfoa-ranking li{align-items:center;background:#fff;border:1px solid #ddd;border-radius:8px;display:grid;grid-template-columns:3.5rem minmax(0,1fr) 2rem;gap:.5rem;margin-bottom:.5rem;padding:.6rem}

.pnfoa-slot-label{color:#1d4ed8;font-weight:700}.pnfoa-slot-name{color:#667085}.pnfoa-slot.is-filled .pnfoa-slot-name{color:#1f2937;font-weight:700}.pnfoa-slot.is-over{outline:2px solid #1d4ed8;outline-offset:2px}

.pnfoa-ranking button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.pnfoa-actions{align-items:center;display:flex;justify-content:flex-end;gap:.75rem;margin-top:1rem;padding:1rem 0}

.pnfoa-actions .primary{background:#1d4ed8;color:#fff;border-color:#1d4ed8;text-align:center;width:auto}

.pnfoa-message{padding:1rem;border:1px solid #ddd;border-radius:8px;background:#fafafa}

@media (max-width: 760px) {
  .pnfoa-columns {
    grid-template-columns: 1fr;
  }
}

.pnfoa-ballot-confirmation{padding:32px;border:1px solid #d4af37;border-radius:12px;background:#1b1b1b;color:#fff}.pnfoa-ballot-confirmation h2{color:#d4af37;margin-top:0}.pnfoa-ballot-confirmation .primary{display:inline-block;background:#d4af37;color:#000;padding:12px 20px;border-radius:6px;text-decoration:none;font-weight:700}

/* Keep the submit button anchored right while status messages wrap below it. */
.pnfoa-vote .pnfoa-actions{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}
.pnfoa-vote .pnfoa-actions .primary{flex:0 0 auto}
.pnfoa-vote {padding-bottom:var(--pnfoa-actions-space,160px)}
.pnfoa-vote .pnfoa-actions {
  position:fixed;bottom:0;left:50%;transform:translateX(-50%);
  width:calc(100% - 16px);max-width:1248px;box-sizing:border-box;
  margin:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  background:#000;border:0;border-radius:0;
  box-shadow:0 -4px 16px rgba(0,0,0,.25);z-index:50;
}
.pnfoa-vote .pnfoa-candidates {
  align-self:start;align-content:start;grid-auto-rows:44px;
}
.pnfoa-vote .pnfoa-candidate {
  height:44px;min-height:44px;box-sizing:border-box;white-space:nowrap;overflow-wrap:normal;
  display:flex;align-items:center;
}
.pnfoa-vote .pnfoa-status{flex-basis:100%;max-width:100%;text-align:right;overflow-wrap:anywhere}
.pnfoa-vote .pnfoa-actions .pnfoa-status {margin:0;line-height:1.35;font-size:14px}
.pnfoa-vote-instructions ul{list-style:disc;margin:0;padding-left:1.4rem}
.pnfoa-vote-instructions li{margin:.35rem 0;color:#374151;line-height:1.5}
.pnfoa-vote .pnfoa-status:empty{display:none}

/* Keep removal controls visible against the white ranking pills. */
.pnfoa-vote .pnfoa-ranking .pnfoa-slot button,
.pnfoa-vote .pnfoa-ranking .pnfoa-slot button:hover,
.pnfoa-vote .pnfoa-ranking .pnfoa-slot button:focus {
  color: #000 !important; background: transparent !important;
  border: 0 !important; box-shadow: none !important;
}
.pnfoa-vote .pnfoa-candidate { border: 0; border-radius: 999px; box-shadow: none; }
.pnfoa-vote .pnfoa-slot[draggable="true"] .pnfoa-slot-name { cursor: grab; }
.pnfoa-ballot-drag-preview {
  position: fixed; top: -1000px; left: -1000px;
  padding: 10px 18px; border-radius: 999px; border: 0;
  outline: 0; box-shadow: none; background: #fff; color: #000;
  font: 700 16px system-ui, sans-serif; white-space: nowrap;
  pointer-events: none;
}

.pnfoa-vote .pnfoa-ranking .pnfoa-slot .pnfoa-ballot-remove {display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;min-width:30px;padding:5px;border-radius:4px;cursor:pointer}
.pnfoa-vote .pnfoa-ranking .pnfoa-slot .pnfoa-ballot-remove[hidden] {display:none}

.pnfoa-vote .pnfoa-position.is-complete {border-color:var(--pn-gold,#c9a23f);box-shadow:inset 0 0 0 1px var(--pn-gold,#c9a23f)}
.pnfoa-vote .pnfoa-position.is-complete .pnfoa-ranking {background:var(--pn-gold,#c9a23f);border-color:var(--pn-gold,#c9a23f);color:#000}
.pnfoa-vote #pnfoa-ballot-form[aria-busy="true"] .pnfoa-position {pointer-events:none}
.pnfoa-vote .pnfoa-ranking li {grid-template-columns:2.8rem minmax(0,1fr) 6.2rem}
.pnfoa-slot-actions {display:flex;align-items:center;justify-content:flex-end;gap:2px}
.pnfoa-vote .pnfoa-slot-actions button {color:#000;min-width:30px;min-height:36px;padding:3px;border-radius:4px}
.pnfoa-vote .pnfoa-slot-actions button[hidden] {display:none}
.pnfoa-vote .pnfoa-position-status {color:#fff;font-size:14px;margin:0 0 12px}
.pnfoa-vote .is-complete .pnfoa-ranking {background:var(--pn-gold,#c9a23f);border-color:var(--pn-gold,#c9a23f)}
.pnfoa-ballot-jump {display:none}
@media(max-width:600px) {
  .pnfoa-vote {max-width:100%;margin:0}
  .pnfoa-vote .pnfoa-position,.pnfoa-vote .pnfoa-vote__header {padding:14px}
  .pnfoa-vote .pnfoa-ranking {padding:10px}
  .pnfoa-vote .pnfoa-ranking li {gap:4px;padding:8px;grid-template-columns:1.6rem minmax(0,1fr) 8.5rem}
  .pnfoa-vote .pnfoa-slot-actions button {min-width:44px;min-height:44px;padding:5px}
  .pnfoa-vote .pnfoa-ranking .pnfoa-slot .pnfoa-slot-actions .pnfoa-ballot-remove {min-width:44px;width:44px;height:44px;flex-basis:44px}
  .pnfoa-vote .pnfoa-candidates {grid-template-columns:repeat(2,minmax(0,1fr))}
  .pnfoa-vote .pnfoa-candidate {font-size:14px;overflow-wrap:anywhere}
  .pnfoa-vote .pnfoa-ballot-jump {display:inline-block;color:var(--pn-gold,#c9a23f);min-height:36px;margin-bottom:8px}
  .pnfoa-vote .pnfoa-slot-name {overflow-wrap:anywhere;font-size:14px}
  .pnfoa-vote .pnfoa-candidate {min-height:44px}
  .pnfoa-vote .pnfoa-actions .primary {min-height:44px;padding:10px 14px}
}

/* Full names stay on one line; JavaScript fits one shared size for the ballot. */
.pnfoa-vote .pnfoa-candidate,.pnfoa-vote .pnfoa-slot-name {font-size:var(--pnfoa-name-size,15px)}
.pnfoa-vote .pnfoa-candidates.pnfoa-single-column {grid-template-columns:minmax(0,1fr)}
