/******************************************
/* CSS reference chatgpt
/*******************************************/

/* Box Model Hack */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/******************************************
/* BASE STYLES
/*******************************************/
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #0b132b, #1c2541);
  color: #fff;
  margin: 0;
  min-height: 100vh;
}

h1 {
  text-align: center;
  margin: 20px 0;
  font-size: 2rem;
  color: #f9f9f9;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/******************************************
/* LAYOUT
/*******************************************/
.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 0 20px 40px;
}

/* Map */
#map {
  height: 90vh;
  width: 65%;
  border-radius: 15px;
  border: 2px solid #3a506b;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Facilities Info Panel */
#facilitiesInfo {
  width: 30%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  padding: 15px 20px;
  overflow-y: auto;
  max-height: 90vh;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/******************************************
/* DETAILS + LIST STYLES
/*******************************************/
details {
  margin-bottom: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 5px 10px;
  transition: background 0.3s;
}

details:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

summary {
  cursor: pointer;
  font-weight: bold;
  color: #7fc8f8;
  list-style: none;
  outline: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▶ ";
  color: #7fc8f8;
  transition: transform 0.2s;
}

details[open] summary::before {
  transform: rotate(90deg);
}

/* Facility Lists */
ul {
  list-style-type: none;
  padding-left: 15px;
}

li {
  padding: 3px 0;
  font-size: 0.95rem;
  color: #d0d0d0;
}

li:hover {
  color: #ffffff;
  text-shadow: 0 0 5px #7fc8f8;
}

/******************************************
/* SCROLLBAR STYLE
/*******************************************/
#facilitiesInfo::-webkit-scrollbar {
  width: 8px;
}

#facilitiesInfo::-webkit-scrollbar-thumb {
  background: #7fc8f8;
  border-radius: 5px;
}

#facilitiesInfo::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

/******************************************
/* MOBILE OPTIMIZATION
/*******************************************/
@media (max-width: 720px) {
  body {
    margin: 10px;
    font-size: 14px;
  }

  h1 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  #map {
    width: 100%;
    height: 39vh;
    border-radius: 12px;
  }

  #facilitiesInfo {
    width: 100%;
    max-height: 40vh;
    overflow-y: scroll;
    background-color: #f9f9f9;
    border-radius: 12px;
    padding: 10px;
  }

  details summary {
    font-size: 1rem;
    cursor: pointer;
  }

  details ul {
    padding-left: 15px;
  }

  li {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  /* Improve Leaflet touch behavior */
  .leaflet-control-zoom {
    transform: scale(0.9);
    bottom: 10px;
    right: 10px;
  }

  /* Prevent horizontal scrolling */
  html, body {
    overflow-x: hidden;
  }
}
