/* Migration overrides — add any CSS fixes needed for Next.js rendering */

/* Uncontested toggle: slide dot and change background when checked */
.fs-checkbox_button-7:checked ~ .fs-checkbox_toggle-dot-7 {
  transform: translateX(1rem);
}

.fs-checkbox_button-7:checked ~ .fs-checkbox_mask-7 {
  background-color: var(--ppp-gold, #ffd100);
}

/* District column: show county list on info icon hover (replaces IX2 interaction) */
.col1_content-wrapper {
  position: relative;
}

.col1_content-wrapper .info_icon-holder:hover + .col1_counties-text-wrapper {
  display: block;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  background-color: #fff;
  border: 1px solid var(--gray-medium, #ccc);
  padding: 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Back to Top button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--unc-blue, #4c9cd3);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: #3a8ac1;
}

/* Year toggle buttons */
.year-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
  align-content: flex-start;
  border: 1px solid var(--borders, #e2e2e2);
  border-radius: 8px;
  padding: 0.5rem;
}

.year-toggle {
  gap: 0.5rem;
  border: none;
  border-radius: 5px;
  background: var(--gray-light, #e8e8e8);
  color: var(--black);
  align-items: center;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  display: flex;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  font-family: inherit;
}

.year-toggle.is-active {
  background: var(--unc-blue, #4c9cd3);
  color: #fff;
}

.year-toggle:hover:not(.is-active) {
  background: var(--gray-medium, #ccc);
}

.year-toggle-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
}

/* Mobile filter panel: scroll within viewport */
@media screen and (max-width: 991px) {
  .filters1_top-sticky-mobile {
    gap: 0;
  }

  .filters1_top-sticky-mobile.is-panel-open {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-height: calc(100vh - 2rem);
    border-radius: 12px;
    border: 1px solid var(--unc-blue);
    z-index: 8888888;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    background-color: #fff;
  }


  .filter-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 8888887;
  }

  .filters1_tablet-filters-button {
    border-bottom: 1px solid var(--borders, #e2e2e2);
    padding-bottom: 0.75rem;
  }

  .filters1_filters-wrapper {
    padding-top: 1rem;
    overflow-y: auto !important;
    flex: 1;
    min-height: 0;
    padding-bottom: 1.5rem;
  }
}
