html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

/* Top header (if used) */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #0b5ed7;
  color: white;
  padding: 10px 16px;
}

/* LEFT */
#header-left {
  font-size: 18px;
  font-weight: bold;
}

/* CENTER (true centered, not just middle column) */
#header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  font-size: 12px;
  opacity: 0.85;
  letter-spacing: 0.3px;
}


#clear-btn {
  position: fixed;
  bottom: 15px;
  left: 15px;
  z-index: 2000;

  padding: 8px 12px;
  background: white;
  border: 1px solid #ccc;
  cursor: pointer;
}


/* RIGHT (placeholder for future buttons if needed) */
#header-right {
  width: 150px; /* keeps spacing balanced */
}


/* keep container transparent */
.leaflet-control-container {
  background: transparent;
}

/* ONLY keep zoom buttons clean, not everything */
.leaflet-control-zoom {
  background: transparent;
  box-shadow: none;
}

/* FIX layer control specifically */
.leaflet-control-layers {
  background: rgba(255,255,255,0.95) !important;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

/* text readability */
.leaflet-control-layers label {
  color: #000 !important;
  font-weight: 500;
}


@media (max-width: 768px) {

  #header {
    flex-direction: column;
    height: auto;
    padding: 6px;
    text-align: center;
  }

  #header-left,
  #header-center,
  #header-right {
    width: 100%;
    font-size: 13px;
    margin-bottom: 4px;
  }

  #panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  
    width: 100%;
    height: 30vh;
    max-height: 30vh;
  
    overflow-y: auto;
  
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(6px);
  
    z-index: 900;
  
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  #map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  #clear-btn {
    position: fixed !important;
  
    right: 10px !important;
    bottom: 32vh !important;
  
    z-index: 1001;
  }

  #addressInput {
    width: 160px !important;
  }

  .leaflet-control-layers {
    max-width: 220px;
    font-size: 12px;
  }

  .leaflet-popup-content {
    max-width: 220px;
    font-size: 13px;
  }

}



/* your PurpleAir label */
.purpleair-label {
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin: 0;
}

.purpleair-label .pa-inner {
  width: 18px;
  height: 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 8px;
  font-weight: bold;
  color: black;

  text-shadow: 
    -1px -1px 0 white,
     1px -1px 0 white,
    -1px  1px 0 white,
     1px  1px 0 white;
  
  transform: translateY(1px); 
}


/* HEADER LOOK */
#aqhi-header {
  background: #e6e6e6;
  padding: 6px;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
  margin-bottom: 6px;
}

/* COLLAPSED STATE */
#aqhi-panel.collapsed #aqhi-content {
  display: none;
}

#aqhiMessage {
  max-width: 520px;
}

/* PANEL BASE */
#panel {
  width: 360px;
  transition: width 0.3s ease;
  overflow: hidden;
  background: white;
  position: relative;
}

/* COLLAPSED STATE */
#panel.collapsed {
  width: 40px;
  height: 50px;
  overflow: hidden;
  cursor: pointer;
}
#panel {
  transition: height 0.3s ease;  
}

/* HEADER (small toggle strip) */
#panel-header {
  display: flex;
  justify-content: flex-end;
  padding: 4px;
}

/* BUTTON */
#togglePanel {
  cursor: pointer;
  border: none;
  background: none;
  font-size: 16px;
}





/* Main app layout */
#app {
  height: calc(100vh - 52px);  /* subtract header height */
  width: 100%;
  position: relative;
}

/* Map fills left side */
#map {
  height: calc(100vh - 50px);
  width: 100%;
  display: block;
}

#map-instructions {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  
  background: rgba(255,255,255,0.9);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Right control panel */
#panel {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 300px;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  padding: 10px;
  font-size: 12px;
  border-radius: 8px;
}

#panel * {
  font-size: 12px;
}

/* Legend */
.legend img {
  background: white;
  padding: 4px;
  border-radius: 6px;
}

/* Modal overlay */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 20px;
  width: 80%;
  border-radius: 8px;
}

#close {
  float: right;
  cursor: pointer;
  font-size: 24px;
}

.aqhi-label {
  color: black;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  line-height: 30px;

  /* white outline around number */
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0px  0px 2px #fff;
}

.pa-dot {
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.35));
}

@media (max-width: 768px) {

  #panel {
    position: fixed !important;
  
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
  
    width: 100% !important;
  
    height: 140px !important;
    max-height: 140px !important;
  
    overflow-y: auto !important;
  
    z-index: 2000 !important;
  
    background: rgba(255,255,255,0.96) !important;
  
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }
  
  #app {
    position: fixed !important;
    inset: 0 !important;
  
    width: 100% !important;
    height: 100% !important;
  
    overflow: hidden !important;
  }
  
  #map {
    position: absolute !important;
    inset: 0 !important;
  
    width: 100% !important;
    height: 100% !important;
  }

  #clear-btn {
    position: fixed !important;

    left: 10px !important;
    right: auto !important;

    bottom: 150px !important;

    z-index: 5000 !important;
  }

}


#search-box {
  position: absolute;
  top: 8px;
  right: 25px;
  z-index: 1000;
}

@media (max-width:768px) {

  #search-box {
    position: fixed !important;
  
    top: auto !important;
    bottom: 10px !important;
  
    right: 10px !important;
    left: auto !important;
  
    z-index: 3000 !important;
  }

}
