html, body {
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: #eef;
}
#map-uk, #map-world {
  width: 100vw;
  height: 100vh;
  min-width: 100vw;
  min-height: 100vh;
  position: absolute;
  top: 0; left: 0;
}
#map-world { display: none; }

.leaflet-control-custom {
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.13);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leaflet-control-custom.active,
.globe-btn.active {
  background: #fff6e5 !important;
}
.leaflet-control-custom i.fas.fa-globe {
  font-size: 1.5em;
}
.leaflet-draw-toolbar {
  display: none !important;
}
.leaflet-draw-section {
  display: none 
}
/* --- Bottom Panel --- */
#bottom-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -320px;
  max-width: 440px;
  max-height: 75vh; /* prevents it from taking the whole screen on mobile */
  min-height: 80px; /* optional: for aesthetic if nearly empty */
  margin: auto;
  background: #232323;
  color: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.18);
  z-index: 1202;
  transition: bottom 0.35s cubic-bezier(.8, .15, .45, 1.3), max-height 0.2s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#bottom-panel.open { bottom: 0; }
#panel-drag {
  width: 56px;
  height: 7px;
  border-radius: 4px;
  background: #fff5;
  margin: 12px auto 12px auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
}
#panel-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 24px 16px 24px;
  min-height: 32px;
  font-size: 1.13em;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
}

/* --- Metric Row & Pills --- */
.metric-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 18px;
}
.metric-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 1em;
  font-weight: 500;
}
#panel-content .fa-person-walking,
#panel-content .fa-stopwatch {
  color: #F6A800;
  font-size: 1.27em;
}

/* --- Panel Controls --- */
#panel-content select,
#panel-content button {
  margin: 6px 4px;
  padding: 8px 20px;
  border-radius: 10px;
  border: 1.2px solid #aaa;
  font-size: 1.08em;
  background: #fff;
  transition: box-shadow .12s;
  box-sizing: border-box;
}
#panel-content select {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.primary-action, .route-actions-row button {
  background: #ffe28d;
  color: #222;
  border: none;
  border-radius: 10px;
  padding: 0;
  margin: 6px 6px;
  width: 45px;
  height: 45px;
  font-size: 2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
}
.primary-action:hover, .route-actions-row button:hover {
  background: #ffd94a;
}

.route-actions-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 12px;
  width: 100%;
}

#panel-content select:focus,
#panel-content button:focus,
.primary-action:focus {
  outline: 2px solid #ff9500;
  outline-offset: 2px;
}
#fab-route:focus { outline: none; }

/* --- Draw Toolbar Container --- */
#draw-toolbar-container {
  position: absolute;
  right: 26px;
  bottom: 208px;
  z-index: 1301;
}

/* --- Floating Action Button --- */
#fab-route {
  position: fixed;
  bottom: 20px;
  right: 14px;
  width: 54px;
  height: 54px;
  border-radius: 10%;
  background: #ffffff;
  color: #fff;
  border: none;
  box-shadow: 0 5px 20px rgba(0,0,0,0.20);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  cursor: pointer;
  outline: none;
  transition: background 0.25s, bottom 0.25s;
}
#fab-route.panel-open {
  bottom: 328px;  /* panel height + 8px */
  background: #202030;
  color: #fff;
}
#fab-route i.fa-xmark { font-size: 1em; }
#fab-route:hover { background: #ff3e95; }
.fa-route {
  font-size: 1.4em;
  color: #000;
}

/* --- Layer Selector Icon and NO Blue Line --- */
.leaflet-control-layers-toggle {
  background-image: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.13);
  position: relative;
  color: #000 !important;
  border: none !important;
}
.leaflet-control-layers-toggle::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f5fd";
  font-size: 1.8em;
  color: #000; 
  display: block;
  line-height: 1;
  margin: auto;
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle::before {
  display: none !important;
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}
.leaflet-control-layers-toggle,
.leaflet-control-layers-toggle:focus,
.leaflet-control-layers-toggle:active,
.leaflet-control-layers-toggle:hover {
  color: transparent !important;   
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  outline: none !important;
  background-image: none !important;
}
