/* Global Styles */
body {
    /* font-family: 'Open Sans', sans-serif; */
    font-family: 'Mona Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* font-size: 1rem; */


    /* background-repeat: no-repeat; */
    /* background-attachment: fixed; */
    /* background-size: cover; Covers the entire viewport */
}

html, body {
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.text-qr-red {
    color: #c3262f !important;
}

.navbar.sticky-top {
  flex-shrink: 0;
}

.border-qr-red {
    border-color: #c3262f !important;
}





.bg-qr-red {
    color: #c3262f !important;
    background-color: #c3262f !important;
}

.table-qr-red {
    color: #c3262f;
}





h1, h2, h3, h4, h5, h6 {
    /* font-family: 'Open Sans', sans-serif; */
    font-family: 'Mona Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 {
    font-size: 1.8em;
    font-weight: 600;
}

h2 {
    font-size: 1.4em;
    font-weight: 600;
}

#searchInput:focus {
    outline: none;
    box-shadow: 0 10px 25px rgba(151, 75, 139, 1.0);
    border: 1px solid #c3262f;
}

.btn-qr-red {
    background-color: #c3262f;
    color: #fff;
    border-color: #c3262f;
}

.btn-qr-red:hover {
    background-color: #c3262f;
    color: #fff;
    border-color: #c3262f;
}

/* Uncomment and modify the sections below as needed */

/*
.full-width-hr {
    margin-left: -2.6rem;
    margin-right: -2.6rem;
    border: 0;
    height: 1px;
    background-color: #a19f9d;
}

.bg-charcoal {
    background-color: #415269;
}

.table-rounded {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0;
    overflow: hidden;
}

.table {
    border-color: #f3f2f1;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 0.9em;
    background-color: #ffffff;
}

.table th {
    background-color: #ffffff;
    text-align: left;
    padding: 0.7em;
    font-weight: 600;
}

.table td {
    text-align: left;
    border-top-width: 0.2em;
    padding: 0.7em;
    font-weight: 400;
}

.table-hover tbody tr:hover {
    background-color: #974b8b;
    color: #fff;
}

.table-hover tbody td:hover {
    background-color: #87447d;
}

.table tbody tr:last-child td {
    border-bottom: none;
}
*/

/* Navbar Styles */
.navbar {
    background-color: #c3262f;
}

/*
.navbar-brand {
}

.nav-link {
}

.nav-link.active,
.nav-link:hover {
}
*/

/* Search Input Styles */
#searchInput {
    width: 24em;
    height: 2.3em;
    padding: 1em;
    font-size: 0.8em;
    border: 0.01em solid #c3262f;
    border-radius: 0.2em;
}

/* Form Wrapper Styles */
/*
.form-wrapper {
    border-radius: 7px;
}

.form-wrapper label {
    font-weight: bold;
}
*/

/* Error Messages Styles */
/*
.errors {
    padding-left: 0;
    text-align: center;
}

.errors li {
    list-style: none;
    display: inline-block;
    margin: 0 5px;
}

.errors ul {
    padding-left: 0;
    margin-bottom: 0;
}
*/

/* Responsive Design */
/*
@media (max-width: 768px) {
    .form-wrapper .text-right {
        text-align: center !important;
    }

    .form-wrapper .btn-primary {
        display: block;
        margin: 0 auto;
    }
}
*/

#map {
  flex-grow: 1;
  width: 100%;
  position: relative;
  z-index: 0;
}

.legend, #mapTitle, #channelToggle {
    background: rgba(255, 255, 255, 1);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;


}

.legend {
  font-family: 'Mona Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #333;
}

.legend i {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    border-radius: 3px;
    background-color: gray;
}
#mapTitle {
    position: absolute;
    top: 70px;
    left: 20px;
    width: 350px;
    z-index: 600;
    text-align: left;
}
#mapTitle h2 {

    font-weight: normal;
    font-family: 'Mona Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;

}
#mapTitle p {

    font-weight: normal;
    font-family: 'Mona Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #333;
}

.toggle-btn {
    padding: 6px 12px;
    margin-right: 6px;
    border: 1px solid #ccc;
    background: #f2f2f2;
    border-radius: 4px;
    cursor: pointer;
}
.toggle-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
#termsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    backdrop-filter: blur(3px);
    opacity: 1;
    transition: opacity 0.4s ease;
}
#termsModal.fade-out {
    opacity: 0;
    pointer-events: none;
}
.terms-content {
    background: white;
    padding: 24px 30px;
    max-width: 500px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    color: #333;
}
#acceptTermsBtn {
    margin-top: 20px;
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
}
#acceptTermsBtn:hover {
    background: #0056b3;
}

.leaflet-tile {
    filter: grayscale(75%) brightness(80%);
}

.leaflet-popup-content b {
  font-weight: 600;
  color: #333;
}

.leaflet-popup {
z-index: 1000 !important;
}

#mapLoadingOverlay {
  position: fixed;
  z-index: 4000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: 'Segoe UI', sans-serif;
}

.spinner {
  border: 8px solid #eee;
  border-top: 8px solid #c3262f;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 20px;
  font-size: 18px;
  color: #333;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#mapControls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 350px;
}

#mapControls > div {
  background: rgba(255, 255, 255, 1);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.leaflet-control-container .leaflet-bottom.leaflet-right {
  margin-bottom: 20px; /* adjust if needed */
  margin-right: 12px;
}

@media (max-width: 480px) {
  .leaflet-control-container .leaflet-bottom.leaflet-right {
    margin-bottom: 120px; /* extra breathing room on small screens */
  }
}

.legend.collapsed {
  max-height: 32px;
  max-width: 100px;
  overflow: hidden;
  padding: 6px 10px;
  text-align: right;
}

.legend.collapsed label,
.legend.collapsed hr,
.legend.collapsed b {
  display: none;
}

/* Responsive UI tweaks for tablet and mobile */
@media (max-width: 768px) {

  /* Shrink and adapt map title block */
  #mapTitle {
    font-size: 0.85rem;
    width: 90vw;
    left: 5vw;
    padding: 10px;
  }

  #mapTitle img {
    height: 60px !important;
    margin-bottom: 10px;
  }

  #toggleTitleBtn {
    font-size: 0.9em;
  }

  #mapTitle p,
  #mapTitle h2,
  #mapTitle .fs-5 {
    font-size: 0.85rem !important;
    line-height: 1.4;
  }

  /* Stack controls vertically and stretch to width */
  #mapControls {
    bottom: 20px;
    left: 5vw;
    width: auto; /* Let content size dictate width */
    max-width: 50vw;
    min-width: 100px;
    flex-direction: column;
    align-items: flex-start;
  }

    #mapControls > div {
    width: 100%;
    max-width: 150px;
    padding: 8px 10px;
  }

  #channelToggle,
  #datasetSelector {
    font-size: 0.9rem;
  }

  #leftBtn,
  #rightBtn {
    font-size: 0.75rem !important;
    width: 48% !important;
    padding: 5px 8px;
  }

  #datasetDropdown {
    width: 100%;
    font-size: 0.9rem;
  }

  /* Shrink legend */
  .legend {
    font-size: 0.75rem;
    padding: 8px 10px;
    max-width: 90vw;
    transition: max-height 0.3s ease;
  }

  .legend i {
    width: 14px;
    height: 14px;
    margin-right: 6px;
  }

  /* Adjust loading text size */
  #mapLoadingOverlay .loading-text {
    font-size: 1rem;
  }

  /* Popup audio player responsiveness */
  .leaflet-popup-content audio {
    width: 100%;
  }
}

/* Collapsed map title */
#mapTitle.collapsed {
  width: 180px !important;
  height: auto;
  overflow: hidden;
  padding: 8px 12px;
  text-align: center;
}

#mapTitle.collapsed img {
  height: 60px !important;
  margin-bottom: 4px;
}

#mapTitle.collapsed .fs-5,
#mapTitle.collapsed p {
  display: none;
}

#toggleTitleBtn {
  font-size: 0.85rem;
  float: right;
}













