.voting-page {
  color: #27323f;
  background: #eef3f8;
}

.voting-page-hero {
  background: #18212d;
  color: #ffffff;
  padding: 132px 0 42px;
}

.voting-page-hero__eyebrow {
  color: #9ee5e8;
  font-family: var(--thm-gilroy-bold);
  font-size: 14px;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.voting-page-hero h1 {
  color: #ffffff;
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.voting-page-hero p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 1.55;
  max-width: 860px;
  margin: 0;
}

.voting-page-section {
  padding: 34px 0 58px;
}

.voting-locations {
  text-align: left;
}

.voting-locations.is-loading .voting-locations__body {
  opacity: 0.45;
}

.voting-locations__notice {
  border: 1px solid #d8e0ea;
  border-left: 6px solid #007d85;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(24, 33, 45, 0.08);
  margin-bottom: 22px;
  padding: 20px 22px;
}

.voting-locations__notice h2 {
  color: #18212d;
  font-size: 24px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.voting-locations__notice p {
  color: #445266;
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.voting-locations__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.voting-locations__summary article {
  border-top: 1px solid #d8e0ea;
  border-radius: 8px;
  background: transparent;
  padding: 14px 0 0;
}

.voting-locations__summary strong {
  display: block;
  color: #332e98;
  font-size: 32px;
  line-height: 1;
  margin-top: 8px;
}

.voting-locations__summary span {
  display: block;
  color: #667384;
  font-size: 14px;
  line-height: 1.35;
}

.voting-locations__controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(240px, 1.4fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.voting-locations__controls select,
.voting-locations__controls input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #ccd7e3;
  border-radius: 8px;
  color: #18212d;
  background: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  padding: 0 14px;
}

.voting-locations__controls button {
  min-height: 48px;
  border: 1px solid #332e98;
  border-radius: 8px;
  color: #332e98;
  background: #ffffff;
  font-family: var(--thm-gilroy-bold);
  padding: 0 18px;
}

.voting-locations__body {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.35fr);
  gap: 18px;
  align-items: start;
}

.voting-locations__map {
  position: sticky;
  top: 92px;
  height: 620px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f7;
}

.voting-locations__map .maplibregl-canvas {
  outline: none;
}

.voting-locations__map .maplibregl-marker {
  z-index: 5;
}

.voting-locations__map .maplibregl-popup {
  z-index: 10;
}

.voting-locations__map-status {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  z-index: 650;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  color: #18212d;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(24, 33, 45, 0.16);
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 14px;
}

.voting-locations__table-panel {
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.voting-locations__table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e0e6ee;
  padding: 14px 16px;
}

.voting-locations__table-head h2 {
  color: #18212d;
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
}

.voting-locations__table-head span {
  color: #667384;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.voting-locations__table-scroll {
  max-height: 620px;
  overflow: auto;
}

.voting-locations table {
  width: 100%;
  border-collapse: collapse;
}

.voting-locations th,
.voting-locations td {
  border-bottom: 1px solid #edf1f5;
  color: #27323f;
  font-size: 14px;
  line-height: 1.35;
  padding: 12px 10px;
  vertical-align: top;
}

.voting-locations th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #445266;
  background: #f8fafc;
  font-family: var(--thm-gilroy-bold);
  font-size: 13px;
}

.voting-locations tbody tr {
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.voting-locations tbody tr.is-mappable {
  cursor: pointer;
}

.voting-locations tbody tr.is-mappable:hover,
.voting-locations tbody tr.is-mappable:focus {
  outline: none;
  background: #f1fbfc;
}

.voting-locations tbody tr.is-active {
  background: #eeedff;
  box-shadow: inset 4px 0 0 #332e98;
}

.voting-locations tbody tr.is-not-mappable {
  background: #fbfcfe;
}

.voting-locations td strong,
.voting-locations td span {
  display: block;
}

.voting-locations a {
  color: #007d85;
  font-weight: 700;
}

.voting-type {
  display: inline-flex;
  width: max-content;
  max-width: 160px;
  border-radius: 8px;
  color: #18212d;
  background: #eef3f8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 8px;
}

.voting-type--main {
  color: #332e98;
  background: #eeedff;
}

.voting-type--early {
  color: #007d85;
  background: #e6f6f7;
}

.voting-type--shifted {
  color: #9a4a00;
  background: #fff2e4;
}

.maplibregl-popup-content {
  min-width: 220px;
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(24, 33, 45, 0.22);
  color: #18212d;
  font-size: 14px;
  line-height: 1.35;
  padding: 14px 16px;
}

.maplibregl-popup-content strong,
.maplibregl-popup-content span {
  display: block;
  line-height: 1.35;
  margin-bottom: 5px;
}

.voting-locations__empty {
  color: #667384;
  font-size: 15px;
  line-height: 1.5;
  padding: 18px;
}

.voting-locations__download {
  margin-top: 18px;
}

.voting-locations__download a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 14px;
}

@media only screen and (max-width: 1199px) {
  .voting-locations__body {
    grid-template-columns: 1fr;
  }

  .voting-locations__map {
    position: relative;
    top: auto;
    height: 520px;
  }
}

@media only screen and (max-width: 991px) {
  .voting-locations__summary,
  .voting-locations__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voting-page-hero h1 {
    font-size: 34px;
  }
}

@media only screen and (max-width: 576px) {
  .voting-page-hero {
    padding-top: 118px;
  }

  .voting-page-hero h1 {
    font-size: 28px;
  }

  .voting-locations__summary,
  .voting-locations__controls {
    grid-template-columns: 1fr;
  }

  .voting-locations__table-scroll {
    max-height: none;
  }

  .voting-locations__map {
    height: 420px;
  }

  .voting-locations th,
  .voting-locations td {
    font-size: 13px;
    padding: 10px 8px;
  }
}
