html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

/* For most features, min and max measurements have been used to guarantee consistent feature sizing depending on screen ratio and size */


/* Map set to lowest z-index */
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;        
  height: 100%;
  z-index: 0; 
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Header set to 1 above map */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
  background-color: rgb(230, 236, 228) !important;
  backdrop-filter: blur(4px);
}

/* Container for time slider */
.bubble-div {
  position: fixed; /* position fixed and at bottom of page */
  background-color: rgb(230, 236, 228, .6);
  backdrop-filter: blur(4px);
  border: 1px solid rgb(201, 201, 206);
  border-radius: 1rem;
  padding: 1rem;
  bottom: 30px;
  z-index: 1000; /* i.e. nothing should cover this feature */
  min-width: 450px;    
  width: 20vw;   
  height: 5vw;
  min-height: 100px;
}

/* Sidebar to help control left hand side features */
.sidebar {
  position: absolute;
  top: 66px; 
  left: 0;
  height: calc(100% - 56px);
  width: 50vw;
  padding: 1rem;
  overflow-y: auto;
  z-index: 1;
  pointer-events: none;  /* As 50vw (i.e. 50% of width) necessary so user can click through it to map */    
}

/* Sidebar pointer events disabled to stop map obstruction, but sidebar children exempt */
.sidebar * {
  pointer-events: auto;
}

.CsLogo {
  cursor: pointer;
}

#crowdscope {
  font-family: "Outfit", sans-serif;
  font-size:x-large;
  font-optical-sizing: auto;
  font-weight: 400;
  color:#27504a;
  letter-spacing: -2px;
  margin-top: 5px;
}


/* Time slider control*/
.slider-container {
  width: 100%;
}

#hourSlider {
  width: 100%;
  margin-top: 10px;
}

/* Labels showing hour range under time slider */
.tick-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 1px;
  user-select: none;
  color: #747472;
}

.tick-labels span {
  text-align: center;
  flex: 1;
}

/* Styling for time slider itself */
input[type=range] {
  -webkit-appearance: none; /* Remove default styling */
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}

/* Thumb of time slider styling */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background-color: #27504a;
  border-color: 1px solid rgba(49, 97, 61, 0.992);
  width: 10px;
  height: 20px;
  border-radius: 5px;
  cursor: pointer;
}

/* Thumb hover effect for visual accessibility */
input[type=range]:hover::-webkit-slider-thumb {
  transform: scale(1.1);
  background-color:rgb(125, 189, 152);
}

/* Zoom control styling */
.zoom-controls {
  position: absolute;
  bottom: 30px; 
  right: 1rem;
  display: flex;
  flex-direction: column;
  z-index: 999; 
} 

.zoom-controls button {
  all: unset;
  display: inline-block;
  width: fit-content;
  height: fit-content;
}


.zoom-controls img {
  box-sizing: border-box;
  width: 4vw; /* Size of png for button */
  height: 4vw;
  min-width: 3rem;
  min-height: 3rem;
  max-width: 5.5rem;
  max-height: 5.5rem;
  cursor: pointer; 
  backdrop-filter: blur(4px);
  background-color:rgb(230, 236, 228, .6);
  border: 1px solid rgb(201, 201, 206);
  border-radius: 1rem;
  padding: 1vw;
  bottom: 1rem;
  z-index: 1000;
}

/* Image has hover styling for visual accessibility  */
.zoom-controls img:hover {
  background-color: rgba(253, 253, 253, 0.637);
  border: 1px solid rgb(226, 226, 228);
}


#dayButtons {
  position: fixed;
  bottom: max(130px, 6vw);
  left: .2rem;
  z-index: 1000;        
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  display: flex;
  gap: .42rem; 
}

/* Day button styling, active and hover effects */
#dayButtons button {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  min-width: 3.61rem;
  min-height: 2.4rem;
  width: 2.69vw;
  height: 1.8vw;
  backdrop-filter: blur(4px);
  border: 1px solid rgb(201, 201, 206);
  border-radius: 10px;
  background-color:rgb(230, 236, 228, .6);
  color:#151616d5;
  transition: all 0.2s ease;
}

#dayButtons button:hover {
  background-color:#49837a;
  border: 1px solid #366460;
  color: white;
  cursor: pointer;
}

#dayButtons button.active {
  background-color:#27504a;
  border: 1px solid #1e3633;
  color: white;
  font-weight: bold;
}

/* Menu Button and dropdown item styling */
#menuButton {
  margin-right: 9px;
  background-color: #27504a;
  border: 1px solid #1e3633;
  color: white;
  border-radius: 10px;
  font-weight: 400;
}

#menuButton:hover {
  cursor: pointer;
  background-color:#49837a;
  transition: all 0.2s ease;
}
.dropdown-menu {
  position: absolute;
  z-index: 1000 !important;
} 

#searchInput{
  width: 20vw;
  min-width: 370px;
}

/* Search icon and container */
.search-container {
  position: relative;
  width: 20vw;
  min-width: 370px;
}

.search-icon {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 15px;
  height: 15px;
  pointer-events: none; 
  color: #757575;
}

/* Location search suggestions */
#suggestions {
  position: absolute;
  left: 1rem;
  right: 1rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.95);
  list-style-type: none;
  padding-left: 0;
}

#suggestions li {
  padding: 0.5rem;
  cursor: pointer;
}

#suggestions li:hover {
  background-color: #eee;
}

/* Button container and marker buttons */
.button-container {
  position: absolute; 
  top: 72px; 
  right: 10px;
  padding: 10px;
}

/* Buttons disappear when screen is too small to stop overlap */
@media (max-width: 900px) {
  .button-container {
    display: none;
  }
}

/* Marker filter buttons */
.filter-button {
  flex:1; /* Content fills */ 
  min-width: 130px; 
  min-height: 2.3rem;
  width: 5vw;
  height: 1.5vw;
  border-radius: 8px;
  background-color: white;
  border: 1px solid rgb(195, 197, 195);
  color: #3f3f3f;
}

.filter-button.active {
  background-color: rgb(195, 197, 195);

}

/* Icon in button and icon marker styling */
.button-icon{
  min-height: 20px;
  min-width: 20px;
  height: 1vmin;
  margin-bottom: 4px;
  margin-right: 3px;
}

.custom-marker {
  background-color: rgba(253, 253, 253, 0.74);
  border: 1px solid rgb(36, 36, 36);
  border-radius: 50% 50% 0 50%;
  gap: 15px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-marker .marker-icon {
  width: 20px;
  height: 20px;
}

/* Targets any marker button */
button[data-filter]:hover {
  background-color:rgb(173, 173, 173);
  color: #2c2c2c;
}


/* Loading page styling */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loader.hidden {
  display: none !important;
  pointer-events: none !important;
}

.loading-image {
  position: fixed;
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  z-index: 9999; 
  width: auto;
  height: auto;
}

.hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Joystick for pitch change  */

#joystick-container {
  position: absolute;
  bottom: 1.9rem;
  right: 5rem;
  margin-right: 2vw;
  width: 100px;
  height: 100px;
  backdrop-filter: blur(4px);
  border: 1px solid rgb(201, 201, 206);
  background-color:rgb(230, 236, 228, .6);
  border-radius: 30px;
  touch-action: none;
  user-select: none;
  z-index: 1000;
}

#joystick-thumb {
  /* If Width height changed, Joystick JS needs to be updated to reflect size change */
  width: 30px;
  height: 30px;
  background: radial-gradient(circle at 30% 30%, #868686, #3d3d3d);
  border: 1px solid #2b2b2bfd;
  cursor: pointer;
  border-radius: 50%;
  position: absolute;
  /* Center of the container */
  top: 35px; 
  left: 35px;
}

#joystick-thumb:hover {
  background: radial-gradient(circle at 30% 30%, #cac7c7, #6e6e6e);
  transition: all 0.2s ease;
}

/* Styling for the favourite button dropdown */
#favouritesButton {
  backdrop-filter: blur(4px);
  background-color: rgba(231, 231, 226, 0.548);
  border-radius: 10px;
  border: 1px solid rgb(134, 134, 134);
  min-width: 4rem;
  width: 4vw;
  max-width: 7rem;
}

#favouritesButton:hover {
  background-color: rgb(255, 253, 131);
}

.dropdown-menu {
  display: none;
  z-index: 1000;
}

/* When JS triggers on-click of favbtn */
.dropdown-menu.show {
  display: block;
  z-index: 1000;
}

/* Styling for the favourite button in popup (not favourite button dropdown menu) */
.favourite-button {
  border-radius: 2px;
  border: 1px solid rgb(134, 134, 134);
  background-color: rgb(255, 221, 25);
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.3);
}

.favourite-button:hover {
  background-color: rgb(255, 237, 135);
}

/* Styling for popup content */
.popup-content {
  font-family: "Outfit", sans-serif;
  overflow: visible; /* Sometimes marker fav button was un-clickable, overflow: visible seems to fix */
}

.popup-title {
  font-size: 400;
  font-weight: bold;
}

.favTxt {
  font-size: 300;
}
