body {
    font-family: 'Open Sans', sans-serif;
    display: flex;
    position: relative;
    height: 100vh;
    width: 100%; /* Full width of the viewport */
    margin: 0;
    overflow: hidden;
}

@media (-webkit-transition) {
    /* CSS to use if this media feature and prefixed transitions are supported */
  }

#left-content {
    font-family: 'Open Sans', sans-serif;
    flex: 1; /* Takes up 1/3 of the space */
    background-color:  #FEFEFA;
    display: flex;
    height: 100%; 
    position: relative;
    flex-direction: column;
    padding-left: 1vw; /* Padding relative to 1% of the width of the viewport */
    padding-right: 1vw;
    overflow-y: auto; 

}
#right-content {
    flex: 2; /* Takes up 2/3 of the space */
    display: flex;
    justify-content: center; /* Center the SVG horizontally */
    align-items: center; /* Center the SVG vertically */
    background-color:  #FEFEFA;
    height: 100%; 
    padding: 1vw; /* Padding relative to 1% of the width of the viewport */
    box-sizing: border-box;
}
.LogoBirdcast {
  position: absolute;
  top: 1vw;
  left: 1vw;
  z-index: 10;
  width: min(360px, 72%);
  height: auto;
}
.axis {
    font: sans-serif;
}

.axis line {
    fill: none;
    stroke: #fff;
    shape-rendering: crispEdges;
}

.axis path  {
    fill: none;
    stroke: #fff;
    shape-rendering: crispEdges;
}
.tooltip {
position: absolute;
z-index: 1000;
text-align: left;
padding: 0;
font: 18px sans-serif;
background: #FFFFFF;
border: 0px;
border-radius: 8px;
overflow: hidden;
pointer-events: none;
opacity: 0;
font-family: 'Open Sans', sans-serif;
color: #333333;
}

.tooltip-primary {
  padding: 8px;
  background: rgba(95, 133, 117, 0.22);
}

.tooltip-comparison {
  margin: 0;
  border-top: 6px solid #FFFFFF;
  padding: 6px 8px 8px;
  background: rgba(59, 178, 208, 0.22);
}

.info-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin: 0 1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #4f6f64;
  font: 700 10px/1 'Open Sans', sans-serif;
  text-decoration: none;
  vertical-align: 1px;
}

.info-link:hover,
.info-link:focus-visible {
  color: #2f5146;
  background: rgba(95, 133, 117, 0.14);
}

#spring-table th:nth-child(1),
#spring-table td:nth-child(1) {
  background: #FFFFFF;
}

#spring-table th:nth-child(2),
#spring-table td:nth-child(2) {
  background: rgba(95, 133, 117, 0.22);
}

#spring-table th:nth-child(3),
#spring-table td:nth-child(3) {
  background: rgba(59, 178, 208, 0.22);
}
.background-shaded-band {
  /*  fill: #F5F5F5; /* Light shade of white */
  fill: #F5F5F5; 
}

#summary-controls {
  margin-bottom: 18px;
}

#mtr-map-trigger,
#vid-map-trigger {
  flex: 0 0 1px;
  width: 100%;
  height: 1px;
  pointer-events: none;
}

#vid-map-trigger {
  margin-top: 28px;
}

.spring-summary-title {
  font-size: 22px;
  line-height: 1.25;
}

.ranking-table-scroll {
  display: block;
  max-height: 280px;
  overflow-y: auto;
  position: relative;
  isolation: isolate;
}

.ranking-table-scroll table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.ranking-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #FEFEFA;
  background-clip: padding-box;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.summary-section {
    display: flex;
    padding: 1vw; /* Padding relative to 1% of the width of the viewport */
    box-sizing: border-box;
}

#spring-summary {
    display: block;
    margin-top: 3vh; /* Starts at 25% of the viewport height */
}

#fall-summary {
    display: block;
    margin-top: 3vh; /* Starts at 75% of the viewport height */
}

.logo-container {
    flex: 0 0 10vh; /* Allocate space for the logo */
    text-align: center;
}

.map { position: absolute; top: 0; bottom: 0; width: 100%; }


#map-content,
#vid-map-content {
    opacity: 0; /* Initially hidden */
}

#d3-content {
    opacity: 1; /* Initially visible */
}

#map-content.show,
#vid-map-content.show {
    opacity: 1;
    transition: opacity 200ms ease-in;
  }

.vid-player-controls {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
  z-index: 5;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 6px;
  background: rgba(254, 254, 250, 0.80);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

.vid-map-canvas {
  position: absolute;
  inset: 0;
}

.vid-map-date {
  z-index: 5;
  pointer-events: none;
  opacity: 0.82;
  letter-spacing: 0.01em;
}

.vid-play-button {
  display: inline-flex;
  width: 40px;
  height: 34px;
  padding: 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid #333;
  border-radius: 4px;
  background: #fff;
  color: #222;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.vid-control-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.vid-control-icon--pause,
.vid-play-button.is-playing .vid-control-icon--play {
  display: none;
}

.vid-play-button.is-playing .vid-control-icon--pause {
  display: block;
}

.vid-play-button:hover,
.vid-play-button:focus-visible {
  background: #f0f0ed;
}

.vid-date-slider {
  width: 100%;
  accent-color: #5D01A6;
}

.vid-date-label {
  min-width: 98px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #222;
}

.vid-loading {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(254, 254, 250, 0.92);
  color: #222;
  font-size: 13px;
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}

.vid-loading.active {
  opacity: 1;
}

.vid-sidebar-legend {
  box-sizing: border-box;
  width: 100%;
  margin: 8px 0 16px;
  padding: 8px 10px 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 5px;
  background: #f2f2ef;
}

.vid-year-control {
  align-self: flex-start;
  width: 112px;
  margin: 0 0 12px;
}

.vid-section-last {
  padding-bottom: 20px;
}

.vid-sidebar-legend svg {
  display: block;
  width: 100%;
  height: auto;
}

.vid-legend-title {
  fill: #222;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.vid-legend-limit {
  fill: #444;
  font-family: 'Open Sans', sans-serif;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.vid-legend-tick {
  stroke: #444;
  stroke-width: 1;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
  }

  body {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  #left-content {
    box-sizing: border-box;
    flex: 0 0 50vh;
    flex: 0 0 50dvh;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    height: 50vh;
    height: 50dvh;
    padding-left: 16px;
    padding-right: 16px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #right-content {
    box-sizing: border-box;
    flex: 0 0 50vh;
    flex: 0 0 50dvh;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    height: 50vh;
    height: 50dvh;
    min-height: 0;
    padding: 8px;
  }

  #d3-content,
  #map-content,
  #diff-map-content,
  #vid-map-content {
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
  }

  #d3-content svg {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    max-width: 100vw;
    height: 100% !important;
  }

  #left-content .select-container {
    width: auto !important;
    min-width: 112px;
    margin-right: 8px;
  }

  .vid-player-controls {
    right: 8px;
    bottom: 8px;
    left: 8px;
    grid-template-columns: auto minmax(70px, 1fr) auto;
    gap: 8px;
    padding: 8px;
    font-size: 13px;
  }

  .vid-play-button {
    width: 36px;
    height: 32px;
    padding: 5px;
  }

  .vid-date-label {
    min-width: 84px;
  }

  #left-content table {
    width: 100% !important;
    table-layout: fixed;
    font-size: 13px;
  }

  #left-content th,
  #left-content td {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  #left-content .grid,
  #left-content p {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #left-content pre {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow-x: auto;
    white-space: normal;
  }

  .tooltip {
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    padding: 6px;
    font-size: 14px;
  }

  .year-label-right {
    top: 6px;
    left: 6px;
  }

}

.year-label-right {
    position: absolute;
    top: 10px; /* Adjust as needed */
    left: 10px; /* Adjust as needed */
    color: #FEFEFA; /* White text */
    border-radius: 5px; /* Optional: Rounded corners */
    z-index: 2; /* Ensure this is above the map layers */
}


#spinner-container     {
    position: absolute;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust to exactly center */
    z-index: 5; /* Ensure it's above the map */
    opacity: 0; /* Start with spinner hidden */
    visibility: hidden; /* Start with spinner not visible */
    transition: opacity 2s ease, visibility 2s ease;
}

/* When spinner is active */
#spinner-container.active {
    opacity: 1; /* Fully visible */
    visibility: visible; /* Make it visible */
}


.map-overlay {
    position: absolute;
    bottom: 30px; /* Adjust as necessary */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1; /* Ensure it's above the map */
    width: 25vw; 
}


.legend {
    display: none;
    background-color: rgba(32, 32, 32, 0.8); 
    padding: 10px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend .bar {
    height: 10px;
    width: 100%;
    background: linear-gradient(to right, #FF0000, #BF0000, #800000, #400000, #000000, #003300, #006600, #009900, #00CC00, #00FF00);
}

.legend .labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.legend .labels span {
    font-size: 12px;
    color: #FEFEFA;
}

.legend-2 {
    background-color: rgba(32, 32, 32, 0.8); 
    padding: 10px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend-2 .bar {
    height: 10px;
    width: 100%;
    background: linear-gradient(to right, #202020, #0D0887, #5D01A6, #9C179E, #CC4678, #ED7953, #FDB32F, #F0F921, #FFFFFF);
}

.legend-2 .labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

.legend-2 .labels span {
    font-size: 12px;
    color: #FEFEFA;
}

.state-mt-legend {
  position: absolute;
  right: 12px;
  bottom: 24px;
  z-index: 4;
  padding: 10px 12px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  color: #333;
  font: 12px/20px 'Open Sans', sans-serif;
}

.state-mt-legend h4 {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 700;
}

.state-mt-legend div {
  white-space: nowrap;
}

.state-mt-legend div span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  vertical-align: -1px;
}

.state-mt-popup .mapboxgl-popup-content {
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
  color: #333;
  font: 12px/1.4 'Open Sans', sans-serif;
}

.state-mt-popup .mapboxgl-popup-content strong,
.state-mt-popup .mapboxgl-popup-content span {
  display: block;
}

.state-mt-popup .mapboxgl-popup-content span {
  margin-top: 2px;
  color: #555;
}
