/******************************************
/* CSS
/*******************************************/

/* Box Model Hack */
*{
  box-sizing: border-box;
}

/******************************************
/* LAYOUT
/*******************************************/
img{
  display: block;
  margin: 0 auto;
}


/******************************************
/* ADDITIONAL STYLES
/*******************************************/

:root {
  --nasa-blue: #0B3D91;
  --nasa-red: #FC3D21;
  --nasa-light-blue: #1A66FF;
  --nasa-dark: #061A40;
  --nasa-white: #FFFFFF;
  --nasa-gray: #F5F5F5;
}

body {
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--nasa-gray);
  color: #333;
}

#map {
  height: calc(100vh - 60px);
  width: 100vw;
  margin-top: 60px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--nasa-blue);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-left: 10px;
  display: flex;
  align-items: center;
  font-family: 'Orbitron', sans-serif;
}

.navbar-title img {
  height: 30px;
  margin-right: 10px;
}

.github-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s;
}

.github-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.github-link img {
  width: 24px;
  height: 24px;
}

#controls {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 1000;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 300px;
  border-top: 4px solid var(--nasa-red);
}

#search {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

#search:focus {
  outline: none;
  border-color: var(--nasa-blue);
  box-shadow: 0 0 0 2px rgba(11, 61, 145, 0.2);
}

#show-all {
  width: 100%;
  padding: 10px;
  background: var(--nasa-blue);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
}

#show-all:hover {
  background: var(--nasa-light-blue);
  transform: translateY(-1px);
}

#results {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 15px;
  border-radius: 4px;
  border: 1px solid #eee;
  scrollbar-width: thin;
  scrollbar-color: var(--nasa-blue) #f1f1f1;
  pointer-events: auto;
}

#results::-webkit-scrollbar {
  width: 6px;
}

#results::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#results::-webkit-scrollbar-thumb {
  background-color: var(--nasa-blue);
  border-radius: 6px;
}

.result-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.result-item:hover {
  background: rgba(11, 61, 145, 0.05);
  transform: translateX(2px);
}

.facility-info {
  padding: 12px;
  min-width: 250px;
}

.facility-info h3 {
  margin: 0 0 8px 0;
  color: var(--nasa-blue);
  font-size: 16px;
  font-weight: 500;
}

.facility-info p {
  margin: 4px 0;
  font-size: 14px;
  color: #555;
}

.weather-container {
  min-height: 20px;
  margin-top: 10px;
}

.weather-loading {
  color: var(--nasa-blue);
  font-style: italic;
}

.weather-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.weather-error {
  color: var(--nasa-red);
  font-style: italic;
}

.loading {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: white;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-size: 14px;
  border-left: 4px solid var(--nasa-red);
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--nasa-blue);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.leaflet-control-zoom {
  position: fixed !important;
  bottom: 20px;
  right: 20px;
  left: auto !important;
  top: auto !important;
  margin-top: 0 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border-radius: 8px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  background: white !important;
  color: var(--nasa-blue) !important;
  border-bottom: 1px solid #eee !important;
}

.leaflet-control-zoom a:hover {
  background: #f5f5f5 !important;
}

.leaflet-control-zoom-in {
  border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom-out {
  border-radius: 0 0 8px 8px !important;
  border-bottom: none !important;
}

.leaflet-popup {
  margin-bottom: 45px !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
  border: 1px solid rgba(0,0,0,0.1);
}

.leaflet-popup-content {
  max-height: 200px;
  overflow-y: auto;
  margin: 12px !important;
}

.leaflet-popup-tip {
  box-shadow: none !important;
}

@media (max-width: 768px) {
  #controls {
      width: calc(100% - 40px);
      top: 70px;
      left: 20px;
      right: 20px;
  }
  
  .navbar-title span {
      display: none;
  }
  
  #map {
      height: calc(100vh - 60px);
  }
  
  .leaflet-popup {
      margin-bottom: 60px !important;
  }
}