/* styles.css */
.zoom‑ctrl {
  position: absolute;
  /* bring it down about 120px so it hovers over the map */
  top: 120px;
  right: 400px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zoom‑ctrl button {
  width: 34px;
  height: 34px;
  font-size: 20px;
  border: none;
  border-radius: 4px;
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  cursor: pointer;
  transition: background .2s;
}

.zoom‑ctrl button:hover {
  background: #eaeaea;
}

/* Overall body styling */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  height: 100vh;
}

/* Left slider section styling */
.left-section {
  width: 35%;
  background-color: #f0f0f0;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

/* Right content section */
.right-section {
  flex: 1;
  background-color: #ffffff;
  padding: 20px;
  position: relative;
  /* For absolute positioning of county info box */
}

/* Slider containers */
.slider-container {
  margin-bottom: 20px;
}

label {
  font-weight: bold;
}

input[type="range"] {
  width: 50%;
}

/* Map Hover Zoom Related items */
.hover-zoom {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px solid #555;
  border-radius: 5px;
  pointer-events: none;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  display: none;
}

.zoom-content {
  position: absolute;
  transform-origin: 0 0;
}

.map-tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  pointer-events: none;
  display: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Highlighted list item */
.top10Item {
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-left: 0px solid transparent;
}

.top10Item:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.top10Item.highlighted {
  background-color: rgba(0, 86, 179, 0.1);
  border-left: 4px solid #0056b3;
  padding-left: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease, border-left 0.3s ease;
}

/* Top 10 list styling */
#top10 {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#top10List {
  list-style-type: none;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
}

.state-selected {
  stroke: #0d6efd;
  /* bootstrap blue */
  stroke-width: 3;
}

.state-result {
  stroke: #28a745;
  /* bootstrap green */
  stroke-width: 3;
}

/* Smooth transition for county highlights */
.county {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
}

.county-blank {
  fill: white;
  stroke: #ddd;
  stroke-width: 1px;
}

/* pop‑out effect for counties */
.county-zoom {
  transform-box: fill-box;
  /* respect each path’s bbox            */
  transform-origin: center;
  transform: scale(1.1);
  /* ≈ 8 % bigger                        */
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, .30));
  transition: transform .18s ease;
}

.county-top10 {
  /* stroke: #28a745;
  stroke-width: 2px;
  fill: rgba(40, 167, 69, 0.2); */
  transition: fill .3s ease, stroke .3s ease, stroke-width .3s ease;
}

.county-hover {
  stroke: #007bff !important;
  stroke-width: 6px !important;
  fill: rgba(0, 123, 255, 0.25) !important;
  filter: drop-shadow(0 0 3px rgba(0, 123, 255, 0.5));
  transform-origin: center center;
  z-index: 10 !important;
}

/* County info box styling */
/* .county-info-box {
  position: absolute;
  z-index: 100;
  min-width: 240px;
  max-width: 320px;
  padding: 1rem 1.25rem .75rem;
  border-radius: .75rem;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  font-size: .9rem;
  line-height: 1.35;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.1);
} */

/* draggable card tweaks */
.county-info-box {
  position: absolute;
  z-index: 20;
  min-width: 260px;
  max-width: 340px;
  max-height: 20vh;
  /* ←  makes it scroll if content is long  */
  overflow-y: auto;
  /* ←  … scrollable                        */
  padding: 1rem 1.25rem .75rem;
  border-radius: .75rem;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
  font-size: .9rem;
  line-height: 1.35;
  user-select: none;
  /* nicer while dragging                   */
}

.county-info-box.dragging {
  opacity: .90;
  /* slight feedback while moving           */
  cursor: grabbing;
}

/* .county-info-box h3 {
  margin: 0 0 .5rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
} */

.county-info-box h3 {
  margin: 0 0 .3rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: grab;
  /* drag handle                            */
}

.county-info-box.hidden {
  transform: translateY(10px);
  opacity: 0;
}


.ci-row {
  display: flex;
  justify-content: space-between;
  margin: .25rem 0;
  padding: 4px 0;
  border-bottom: 1px dotted #f0f0f0;
}

.ci-label {
  color: #555;
  font-weight: 500;
  margin-right: .75rem;
}

.ci-value {
  font-weight: 600;
  color: #333;
}

.ci-close {
  position: absolute;
  right: .6rem;
  top: .6rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #888;
  transition: all 0.2s;
  width: 22px;
  height: 22px;
  text-align: center;
  border-radius: 50%;
}

.ci-close:hover {
  color: #000;
  background-color: #f0f0f0;
}

/* Choices.js styling */
.choices__inner {
  border-radius: .375rem;
}

.choices__item--choice {
  padding: .35rem .75rem;
}

.choices__item--selectable {
  background: #0d6efd;
  color: #fff;
  border: 0;
  margin: .15rem .25rem;
  border-radius: 3px;
}

.choices__item--remove {
  margin-left: .25rem;
}

.choices__list--dropdown {
  max-height: 260px;
  overflow-y: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Results button */
#resultsButton {
  display: block;
  width: 100%;
  padding: 10px 15px;
  margin-top: 20px;
  background-color: #0d6efd;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#resultsButton:hover {
  background-color: #0b5ed7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#resultsButton:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Animation keyframes for pulsing effect */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

/* Pulsing animation for newly displayed county info */
.county-info-box.pulse {
  animation: pulse 1.5s 1;
}