/* =========================
   Base (Desktop) Styles
   ========================= */

/* General Styles */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Georgia", serif;
  background: #f1f4f9;
}
button#playMusicBtn {
  border-color: white;
  color: white;
}

.disclaimer-popup {
  position: fixed;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(255 255 255 / 85%);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 15px;
  z-index: 1100;
  max-width: 90%;
  width: 500px;
  height: 369px;
  font-size: 13px;
  color: black;
  top: 34%;
}

/* Ensure the overlay is shown initially */
#map-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 2000;
  display: flex; /* Ensure it appears */
  justify-content: center;
  align-items: center;
}

/* Ensure hidden only after accepting */
#map-lock-overlay.hidden {
  display: none;
}


/* Only show it if JavaScript explicitly sets it */
#map-lock-overlay.show {
  display: flex !important;
}

/* Modal Styling */
#tosModal {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 90%;
  width: 500px;
  text-align: center;
  color: black;
}

/* Buttons */
#tosModal button {
  margin: 10px;
}


/* Button styling */
#tosModal button {
  margin: 10px;
}


/* Map Section */
#map {
  width: calc(100% - 320px); /* Leaves space for the sidebar */
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.1),
              inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

/* Sidebar Styles */
.sidebar {
  position: absolute;
  top: 60px;
  left: 0;
  width: 320px;
  height: 100%;
  background: linear-gradient(180deg, #0d1621 0%, #11223c 30%, #152844 60%, #11223c 100%);
  border-radius: 0 20px 20px 0;
  box-shadow:
    8px 0 32px rgba(0, 0, 0, 0.6),
    inset -1px 0 2px rgba(100, 150, 200, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.05);
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
  border-right: 1px solid rgba(100, 150, 200, 0.2);
}

/* Custom Scrollbar for the Sidebar */
.sidebar {
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: #c0c0c8 rgba(255, 255, 255, 0.05); /* Thumb color & track color */
}

/* For WebKit Browsers (Chrome, Edge, Safari) */
.sidebar::-webkit-scrollbar {
  width: 8px; /* Adjust scrollbar width */
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c0c0c8, #a8a8b0);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d0d0d8, #b8b8c0);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Sidebar Title */
.sidebar h1 {
  margin: 0 0 15px;
  font-size: 1.5rem;
  color: #333;
  text-align: center;
  border-bottom: 2px solid #d1d9e6;
  padding-bottom: 10px;
}

/* Search Section */
.search-section {
  margin-bottom: 20px;
  border-radius: 12px;
  background: rgba(13, 22, 33, 0.6);
  backdrop-filter: blur(10px);
  padding: 8px;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(100, 150, 200, 0.1);
  border: 1px solid rgba(100, 150, 200, 0.15);
}

.search-section input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(100, 150, 200, 0.2);
  outline: none;
  font-size: 0.95rem;
  color: #e8e8e8;
  background: linear-gradient(145deg, #0d1621, #0a1118);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(100, 150, 200, 0.1);
  transition: all 0.3s ease;
}

.search-section input:focus {
  background: linear-gradient(145deg, #11223c, #0d1621);
  border-color: rgba(100, 150, 200, 0.4);
  box-shadow:
    0 0 20px rgba(100, 150, 200, 0.25),
    inset 0 2px 6px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(100, 150, 200, 0.2);
  transform: translateY(-2px);
}

.search-section input::placeholder {
  color: #6b8099;
}

.search-section button {
  width: calc(100% - 12px);
  background: #e0e5ec;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: bold;
  box-shadow: 4px 4px 8px #d1d9e6,
              -4px -4px 8px #ffffff;
  color: #333;
  cursor: pointer;
}

.search-section button:hover {
  background: #d1d9e6;
  color: #000;
}

/* Results List */
#results {
  list-style: none;
  margin: 0;
  padding: 0;
}

#results li {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(145deg, #0d1621, #0a1118);
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(100, 150, 200, 0.2);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(100, 150, 200, 0.08);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#results li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #6b9bd1, #4a7fb8);
  opacity: 0;
  transition: opacity 0.3s;
}

#results li:hover::before {
  opacity: 1;
}

#results li:hover {
  transform: translateX(6px);
  background: linear-gradient(145deg, #11223c, #0d1621);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(100, 150, 200, 0.2),
    inset 0 1px 0 rgba(100, 150, 200, 0.15);
  border-color: rgba(100, 150, 200, 0.4);
}

#results li:active {
  transform: translateX(3px) scale(0.98);
}

img.globalLogo {
  position: relative;
  left: -14%;
  height: 15px !important;
}

#results li a {
  text-decoration: none;
  color: #d4e1f0;
  font-weight: 600;
  font-size: 0.95rem;
  flex-grow: 1;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  padding: 8px;
  background: rgba(13, 22, 33, 0.5);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 150, 200, 0.15);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #6b9bd1 rgba(100, 150, 200, 0.1);
}

.pagination-container::-webkit-scrollbar {
  height: 6px;
}

.pagination-container::-webkit-scrollbar-track {
  background: rgba(13, 22, 33, 0.6);
  border-radius: 10px;
  border: 1px solid rgba(100, 150, 200, 0.1);
}

.pagination-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #6b9bd1, #4a7fb8);
  border-radius: 10px;
  border: 1px solid rgba(100, 150, 200, 0.3);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease;
}

.pagination-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #7aabdf, #5a8fc8);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(107, 155, 209, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
  align-items: center;
  flex-wrap: nowrap;
}

.pagination li {
  display: inline-block;
  flex-shrink: 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #d4e1f0;
  background: linear-gradient(145deg, #0d1621, #0a1118);
  border: 1px solid rgba(100, 150, 200, 0.2);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(100, 150, 200, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.pagination a:hover {
  color: #ffffff;
  background: linear-gradient(145deg, #11223c, #0d1621);
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(100, 150, 200, 0.25),
    inset 0 1px 0 rgba(100, 150, 200, 0.15);
  border-color: rgba(100, 150, 200, 0.4);
}

.pagination .current {
  background: linear-gradient(145deg, #6b9bd1, #4a7fb8);
  color: #ffffff;
  border: 1px solid rgba(100, 150, 200, 0.4);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(107, 155, 209, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  transform: scale(1.08);
}

.pagination .disabled span {
  opacity: 0.3;
  cursor: not-allowed;
  background: linear-gradient(145deg, #0a1118, #050810);
}

.pagination .dots span {
  background: transparent;
  border: none;
  color: rgba(100, 150, 200, 0.5);
  box-shadow: none;
  font-weight: 700;
  min-width: 24px;
}

/* Bottom Nav Bar */::before {
    position: absolute;
    top: -13px !important;
}

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 320px;
  right: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  background: #11223c;
  padding: 10px 0;
  z-index: 1100;
}

.nav-bar .tab {
  padding: 8px 16px;
  border-radius: 8px;
  background: #f5be6f63;
  box-shadow: 4px 4px 8px #4a5875, -4px -4px 8px #495f92;
  font-size: 12px;
  font-weight: bold;
  color: #ffffff;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.nav-bar .tab.active {
  background: #333;
  color: #ffffff;
  box-shadow: inset 4px 4px 8px #d1d9e6,
              inset -4px -4px 8px #ffffff;
}

.nav-bar .tab:hover {
  transform: scale(1.1);
}

/* Top Navigation Bar */
.navbar {
  background: #11223c !important;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2),
              -4px -4px 8px rgba(255, 255, 255, 0.7);
  z-index: 1200;
  position: sticky;
  top: 0;
  padding: 10px 20px;
}

.navbar-brand,
.nav-link {
  color: #ffffff !important;
  font-weight: bold;
}

.nav-link.active {
  background: #2d3643;
  color: white !important;
  border-radius: 8px;
}

.navbar-toggler {
  border-color: #ffffff;
}

.navbar-toggler-icon {
  /* Properly encoded single-line SVG */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20viewBox%3D%220%200%2030%2030%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20stroke%3D%22%23333%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-miterlimit%3D%2210%22%20d%3D%22M4%207h22M4%2015h22M4%2023h22%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.25em 1.25em; /* Adjust icon size as needed */
  background-color: transparent !important;
  border: none; /* Remove border if desired */
}

a.nav-link {
  color: #e4e4e4 !important
}

a.navbar-brand {
  color: #e4e4e4 !important
}

button#soundToggle {
  color: black;
}

.sidebar-handle .handle-text {
  display: none;
}
.leaflet-control-zoom.leaflet-bar.leaflet-control {
  display: none;
}

@media (max-width: 768px) {
  /* Body HTML / fill the screen, no scroll behind the sheet */
  html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto; /* Enables vertical scrolling */
  }
   /* Collapsed state: show only the handle button */
   .sidebar:not(.expanded) {
    height: 8%;
    overflow-y: hidden; /* Disable scrolling */
  }
  
  /* Hide search section and places list when collapsed */
  .sidebar:not(.expanded) .search-section,
  .sidebar:not(.expanded) #results-container {
    display: none;
  }

  /* Expanded state: enable full functionality */
  .sidebar.expanded {
    height: 34%;
    overflow-y: auto; /* Re-enable scrolling */
  }

  .disclaimer-popup {
    position: fixed;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(255 255 255 / 85%);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1100;
    max-width: 90%;
    width: 500px;
    height: 46%;
    font-size: 13px;
    color: black;
  }
  

  .nav-bar .tab {
    padding: 5px;
    border-radius: 8px;
    background: linear-gradient(145deg, #0d1621, #0a1118);
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(100, 150, 200, 0.08);
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    border: 1px solid rgba(100, 150, 200, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
  }

  .nav-bar .tab.active {
    background: linear-gradient(145deg, #6b9bd1, #4a7fb8);
    color: #ffffff;
    border: 1px solid rgba(100, 150, 200, 0.4);
    box-shadow:
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 0 20px rgba(107, 155, 209, 0.3),
      inset 0 2px 4px rgba(255, 255, 255, 0.2),
      inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
  }

  .nav-bar .tab:hover {
    background: linear-gradient(145deg, #11223c, #0d1621);
    box-shadow:
      0 4px 12px rgba(0, 0, 0, 0.5),
      0 0 15px rgba(100, 150, 200, 0.2),
      inset 0 1px 0 rgba(100, 150, 200, 0.15);
    border-color: rgba(100, 150, 200, 0.4);
    transform: scale(1.03);
  }

  .nav-bar .tab.active:hover {
    background: linear-gradient(145deg, #7aabdf, #5a8fc8);
    transform: scale(1.05);
}

  .sidebar-handle .handle-text {
    display: inline;
  }

  /* Force no container usage */
  body {
    position: relative;
  }

  /* Nav bar pinned at ~20% from top (as you specified) */
  .nav-bar {
    position: absolute !important;
    top: 9%;
    left: 0;
    right: 0;
    height: 50px; /* adjust if needed */
    z-index: 200;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    margin: 0; /* override any existing margin */
    background: #ffffff38;
  }

  /* Map below nav bar, filling leftover space */
  #map {
    position: absolute !important;
    top: 50px; /* same as .nav-bar height */
    left: 0;
    width: 100%;
    height: calc(100% - 50px);
    border-radius: 0;
    box-shadow: none;
    z-index: 100;
  }

  /* Sidebar as a bottom sheet */
  .sidebar {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    /* Increased collapsed height to show text + a couple of items */
    height: 70px;
    background: linear-gradient(180deg, #0d1621 0%, #11223c 30%, #152844 60%, #11223c 100%);
    backdrop-filter: blur(20px);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300; /* above map, below nav if they overlap */
    /* Override any desktop .sidebar { top: ... } */
    top: auto !important;
    width: auto;
    box-shadow:
      0 -8px 32px rgba(0, 0, 0, 0.6),
      inset 0 1px 2px rgba(100, 150, 200, 0.1);
    border-top: 1px solid rgba(100, 150, 200, 0.2);
  }

  /* The handle at the top of the sidebar (for toggling) */
  .sidebar-handle {
    width: 100%;
    height: 44px; /* Enough space for the text */
    background: rgba(13, 22, 33, 0.8);
    backdrop-filter: blur(10px);
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #d4e1f0;
    font-weight: 600;
    box-shadow:
      0 -2px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(100, 150, 200, 0.1);
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(100, 150, 200, 0.15);
    border-bottom: none;
  }

  .sidebar-handle::before {
    content: '';
    position: absolute;
    top: 12px;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, #6b9bd1, #4a7fb8);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  .sidebar {
    scroll-behavior: smooth;
  }

  .sidebar-handle:hover {
    background: rgba(17, 34, 60, 0.8);
  }

  .sidebar-handle span {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    margin-top: 8px;
  }

  /* Expanded state: sidebar slides up to 60% of screen */
  .sidebar.expanded {
    height: 38%;
  }
  button#playMusicBtn {
    position: relative;
    left: 30%;
    border-color: white;
    color: white;
}

img.globalLogo {
  position: relative;
  left: -37px;
  height: 16px !important;
  
}
}
a#mapDropdown {
  font-size: 15px;
}

.navbar-nav {
  --bs-nav-link-padding-x: 0;
  --bs-nav-link-padding-y: 0.5rem;
  --bs-nav-link-font-weight: ;
  --bs-nav-link-color: var(--bs-navbar-color);
  --bs-nav-link-hover-color: var(--bs-navbar-hover-color);
  --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color);
  display: flex
;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
  position: relative;
  top: 1px;
}
.leaflet-control-zoom.leaflet-bar.leaflet-control {
  display: none;
}
.navbar-toggler-icon {
  filter: brightness(0) invert(1); /* Makes the icon white */
}


@media screen and (max-width: 360px) and (max-height: 740px) {
  button#playMusicBtn {
      position: relative;
      border-color: white;
      color: white;
      left: 28%;
      
  }

  button.navbar-toggler {
    position: relative;
    left: 7%;
}
.navbar-toggler-icon {
  filter: brightness(0) invert(1); /* Makes the icon white */
}


}

  
