/* NC Ballot Tracker: the VoterHub events pill (ballot-tracker-promo.js).
   A "$0 · Free events platform for Democrats" pill pinned to the corner that opens into a
   card; either close button hides it for 24 hours. Colors follow the site palette. */
.vhp { --blue: #0160A6; --blue-h: #01528F; --blue-d: #01487D; --blue-t: #E6F0F8; --green: #2E7D32; --green-d: #1B5E20; --green-t: #E8F3E8;
  --ink: #1B1714; --ink2: #484542; --edge: #CCC6B5;
  position: fixed; z-index: 170; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  font-family: PolymathText, system-ui, sans-serif; color: var(--ink); }
.vhp[hidden], .vhp-toast[hidden] { display: none !important; }
.vhp *, .vhp *::before { box-sizing: border-box; }

/* Pill */
.vhp-pillwrap { position: relative; animation: vhp-rise .35s ease-out; }
.vhp-pill { height: 64px; padding: 0 26px 0 10px; border: 0; border-radius: 100px; background: var(--blue); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font: 600 18px / 1 PolymathText, system-ui, sans-serif;
  box-shadow: rgba(0, 28, 55, .25) 0 10px 30px; }
.vhp-pill:hover { background: var(--blue-h); }
.vhp-pill .material-icons-round { font-size: 20px; }
.vhp-zero { height: 46px; padding: 0 16px; border-radius: 100px; background: #fff; color: var(--green-d); display: inline-flex; align-items: center;
  font: 800 19px / 1 PolymathDisp, serif; }
.vhp-x { position: absolute; top: -16px; right: -16px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; }
.vhp-x span { width: 26px; height: 26px; border-radius: 100px; background: #fff; border: 1px solid var(--edge); color: var(--ink2);
  box-shadow: rgba(0, 28, 55, .18) 0 2px 6px; display: grid; place-items: center; }
.vhp-x .material-icons-round { font-size: 15px; }

/* Card */
.vhp-card { position: relative; width: 380px; background: #fff; border-radius: 18px; overflow: hidden; animation: vhp-rise .3s ease-out;
  box-shadow: rgba(0, 28, 55, .12) 0 2px 6px, rgba(0, 28, 55, .22) 0 18px 48px; }
.vhp-card::before { content: ""; display: block; height: 6px; background: var(--blue); }
.vhp-card-x { position: absolute; top: 10px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 100px; background: transparent;
  color: #5E5B57; cursor: pointer; display: grid; place-items: center; }
.vhp-card-x:hover { background: #F1ECDF; }
.vhp-in { padding: 16px 22px 22px; }
.vhp-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 100px; background: var(--green-t);
  color: var(--green-d); font: 700 12px / 1 PolymathText, system-ui, sans-serif; letter-spacing: .8px; }
.vhp-badge .material-icons-round { font-size: 15px; color: var(--green); }
.vhp-card h2 { margin: 10px 0 6px; font: 800 26px / 1.15 PolymathDisp, serif; word-spacing: .12em; color: var(--ink); }
.vhp-card p { margin: 0; font: 400 15px / 1.45 PolymathText, system-ui, sans-serif; color: var(--ink2); }
.vhp-proof { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--blue-t); color: var(--blue-d); font: 600 13.5px / 1.35 PolymathText, system-ui, sans-serif; }
.vhp-card ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font: 500 14px / 1.35 PolymathText, system-ui, sans-serif; }
.vhp-card li { display: flex; align-items: center; gap: 8px; }
.vhp-card li .material-icons-round { font-size: 17px; color: var(--green); }
.vhp-signup { margin-top: 16px; height: 48px; border-radius: 100px; background: var(--blue); color: #fff !important; text-decoration: none;
  display: flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px / 1 PolymathText, system-ui, sans-serif; }
.vhp-signup:hover { background: var(--blue-h); }
.vhp-signup .material-icons-round { font-size: 19px; }

/* Undo notice */
.vhp-toast { position: fixed; z-index: 171; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  max-width: calc(100% - 24px); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 100px;
  background: #1B1714; color: #fff; box-shadow: rgba(0, 0, 0, .25) 0 8px 24px; font: 500 14px / 1.3 PolymathText, system-ui, sans-serif;
  animation: vhp-rise .25s ease-out; }
.vhp-toast button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 100px; background: #3B3631; color: #fff; cursor: pointer;
  white-space: nowrap; font: 600 13px / 1 PolymathText, system-ui, sans-serif; }

.vhp button:focus-visible, .vhp a:focus-visible, .vhp-toast button:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }

/* Keep the site's back-to-top button clear of the pill. */
body.vhp-on #to-top { bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 640px) {
  .vhp { right: auto; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .vhp.is-card { left: 10px; right: 10px; transform: none; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .vhp-pill { height: 52px; padding: 0 18px 0 8px; gap: 10px; font-size: 15px; }
  .vhp-zero { height: 36px; padding: 0 12px; font-size: 15px; }
  .vhp-x { right: -12px; }
  .vhp-card { width: auto; }
  .vhp-in { padding: 14px 18px 18px; }
  .vhp-card h2 { font-size: 24px; }
  .vhp-proof { padding: 8px 10px; font-size: 13px; }
  body.vhp-on #to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

@keyframes vhp-rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .vhp-pillwrap, .vhp-card, .vhp-toast { animation: none; } }
