/* --- General Page --- */
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #ffdfd17e;
}

/* --- Controls Panel (Banner) --- */
#controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 20px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  
  z-index: 1000;
}

#controls label {
  font-weight: bold;
}

#controls input[type="file"],
#controls select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafafa;
  cursor: pointer;
}

#controls input[type="file"]:hover,
#controls select:hover {
  border-color: #999;
}

/* --- Dashboard Layout --- */
#dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px;
  height: calc(100vh - 60px - 60px); /* subtract banner + controls height */
  box-sizing: border-box;
}

/* --- Map & Chart --- */
#map, #activityChart {
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  background: #fff;
  min-width: 300px;
}

#map {
  flex: 1 1 50%;
  height: 100%;
}

#activityChart {
  flex: 1 1 45%;
  height: 10%;
  min-height: 0; /* avoid overflow */
}

/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
  #map {
    flex: 1 1 55%;
  }
  #activityChart {
    flex: 1 1 40%;
  }
}

@media (max-width: 900px) {
  #map, #activityChart {
    flex: 1 1 100%;       /* stack vertically */
    height: 40vh;         /* adjust height for smaller screens */
  }
}

@media (max-width: 600px) {
  #map, #activityChart {
    flex: 1 1 100%;
    height: 40vh;         /* even smaller screens */
  }
}

/* --- Top Strava Banner --- */
#topBanner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 20px;
  background: #fc4c02; /* Strava Orange */
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1100; /* above controls */
}

#topBanner h1 {
  margin: 0;
  font-size: 1.3rem;
  text-align: center;
  flex: 1;
}

#topBanner .logo,
#topBanner .strava-logo {
  height: 30px; /* adjust as needed */
}

#topBanner .logo {
  margin-right: 10px;
}

#topBanner .strava-logo {
  margin-left: 9px;
}

/* --- Welcome Modal --- */
#welcomeModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#welcomeModal .modal-content {
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

#welcomeModal h2 {
  margin-bottom: 15px;
  color: #FC4C02; /* Strava orange */
}

#welcomeModal p {
  margin-bottom: 20px;
  color: #333;
}

#welcomeModal button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background-color: #FC4C02;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

#welcomeModal button:hover {
  background-color: #e04300;
}
.leaflet-control-legend {
    background: white;
    padding: 5px 15px;
    border: grey;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.3;
}
.leaflet-control-legend .gradient {
    width: 100px;
    height: 20px;
    margin: 5px 0;
    background: linear-gradient(to right, blue, green, yellow, red);
    display: block;
}
.leaflet-control-legend .labels {
    display: flex;
    justify-content: space-between;
    width: 100px;
}


