:root {
  --navbar-height: 5.25rem; /* Set height variables. Change this is you want to change the navbar height*/
}


html, body {
  margin: 0;
  padding: 0;
  height: auto;     /* REQUIRED */
  font-size: medium;
  max-width: 100%;
  overflow: auto;
  touch-action: none;
  overscroll-behavior: none;
  inset: 0;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* important */
}


#map {
position: fixed;
top: var(--navbar-height);
left: 0;
right: 0;
bottom: 0;
flex: 1;
min-height: 0;
touch-action: manipulation;
}

/*
+N+N+N+N+N+N+N+N+N+N+N+N+N+N+N
NAVIGATION BAR SECTION
==============================
*/

#navbar {
  position: fixed;
  height: var(--navbar-height);
  top: 0;
  left: 0;
  right: 0;        /* stays above the map */
  flex-shrink: 0;
  
  

  background: #fff;
  border-bottom: 1px solid #ccc;
  z-index: 9001;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; /* space left and right */
  padding: 0 12px;
  font-family: sans-serif;
}


/* Nav title appears center in its own row */
#nav-title {
  flex: 1 1 auto;
  text-align: center;
  font-weight: bold;
  font-size: 1.3rem;
  padding-top: 0.5rem;   /* adjust to taste */
  padding-bottom: 0.25rem;

}
/* Left group stays left */
#nav-left {
  flex: 0 0 auto;
}


#nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 0.25rem;
}

#nav-left,
#nav-right {
  display: flex;
  gap: 0.5rem;
}


/* Right group stays right */
#nav-right {
  flex-direction: row;
  align-items: flex-end;
}

#shuffle-btn{
  display: none;
}

.nav-btn {
  width: 2.75rem;
  height: 2.75rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 1.25rem;

  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 0.5rem;

  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.nav-btn.active {
  background-color: #d3d3d3;  /* grey background when active */
}

/* While clicking */
.nav-btn:active {
  background-color: #ddd;
  box-shadow: inset 2px 2px 5px rgba(0,0,0,0.3);
  transform: scale(0.95);
}


/*N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N^N
===================================
*/

/*
+S+S+S++S+S+S+S+S+S+S+S+
SEARCH BAR SECTION
+S+S+S+S+S+S+S+S+S+S+S+S+S+*/

.search-panel {
  font-size: 1.5rem;
  display: none;
  position: relative;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #ccc;
  padding: 12px;
  z-index: 5000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.search-section {
  margin-bottom: 12px;
}

.search-section h4 {
  margin: 4px 0 6px 0;
  font-size: 1.25rem;
}

.search-section label {
  margin-right: 1rem;
  font-size: 1.25rem;
  display: inline-block;
}

.search-section input {
  font-size: 1.25rem;
}

.tag-checkbox {
  transform: scale(2);
}

#apply-filters {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  font-size: 1.25rem;
}
/*DVDVDVDVDVDVDVDVDVDVDVDVDVDVDVDV
DROP DOWN MENU SECTION
==================================
*/
.dropdown {
  position: fixed;
  top: var(--navbar-height);
  right: 0px;
  background: #fff;
  border: 1px solid #ccc;
  display: none;   /* HIDE BY DEFAULT */
  flex-direction: column;
  width: 10rem;
  z-index: 4000;
  padding: 8px 12px;
}

.dropdown hr {
  width: 100%;
  border: none;
  border-top: 1px solid #ccc;
  margin: 6px 0;
}
.dropdown a,
.dropdown a:visited {
  color: #000;
  text-decoration: none;
}


.dropdown a:hover {
  background-color: #f3f3f3;
}

.dropdown a:active {
  background-color: #e6e6e6;
}

#menu-row {
  position: absolute;
  top: 100%;          /* directly below navbar */
  right: 12px;

  display: flex;
  justify-content: flex-end;
  width: 100%;

  z-index: 4000;
  pointer-events: none;
}

#menu-dropdown {
  pointer-events: auto;
  background: #fff;
  border: 1px solid #ccc;
  width: 13.75rem;
  z-index: 3000;
}




/*DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
DROP DOWN MENU SECTION ABOVE THIS 
=======================================
*/


/*
======================================
LIST VIEW SECTION BELOW THIS
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL*/

#div-listview-btn {
  position: absolute;
  top: var(--navbar-height);
  left: 50%;
  transform: translateX(-50%);
  
  z-index: 4000;
  
}

#listview-toggle-btn{
  padding: 14px 24px;
  padding-top: 0px;
  padding-bottom: 10px;
  border: 1.5px solid #e0e0e0;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  background-color: #f9f9f9;
  transition: all 0.2s ease;
}

#listview-toggle-btn:hover {
  background-color: #f1f1f1;
  border-color: #cfcfcf;
}

#div-list-view {
  overflow-y: auto; 
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #f9f9f9;
  z-index: 3000;
  display: none;
}

.ListViewTemplate{
  width: 100%;
  max-width: 800px;    /* controls how wide the item can get, make sure to convert to rem later */
  padding: 16px;       /* inner padding inside the template */
  margin: 0 auto;      /* centers the template inside parent */
  margin-top: 16px;
  background-color: #f5f5f5; /* just an example background */
  border-radius: 8px;  /* optional rounded corners */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* subtle shadow */
  box-sizing: border-box;

  font-family: sans-serif;
  font-size: 1.25rem;
}

#list-view-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}





/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
LIST VIEW SECTION ABOVE THIS
========================================*/






/*
L+L+L+L+LL+L+L+L+L+L+L+L+L+L+L+L+
Leaflet popup section
================================ */
.leaflet-container {
  z-index: 1;
  touch-action: manipulation;
}


/*+ - zoom buttons */
.leaflet-control-zoom.leaflet-bar a {
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.75rem;
  font-size: 1.375rem;
  font-weight: bold;

}

.leaflet-control-zoom a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  outline: none;
}

.leaflet-control-zoom a:focus {
  outline: none;
}





/*markers themselvs on the map*/
.leaflet-marker-icon {
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.leaflet-marker-icon:hover {
  opacity: 1;
}



/* These are the popup buttons within the map view. */
.popup-google-pictures-btn,
.popup-website-btn,
.popup-directionse-btn,
.popup-zoom-btn,
.popup-edit-btn {
  min-width: 2.5rem;    /* ~40px tap target */
  min-height: 2.5rem;
  padding: 0;
  font-size: 1.25rem;   /* emoji/icon size */
  line-height: 1;
  border-radius: 0.375rem;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
}

/* Spacing between buttons */
.popup-google-pictures-btn + button,
.popup-website-btn + button,
.popup-directionse-btn + button,
.popup-zoom-btn + button,
.popup-edit-btn + button {
  margin-left: 0.25rem;
}

.popup-title-country {
  font-size: 1rem;   /* slightly smaller */
  color: #666;          /* optional: softer color */
}

.leaflet-popup-content {
  overflow-y: auto;       /* desktop default */
  max-width: 80vw;
  width: clamp(60rem, 75vw, 80rem);
  max-height: 40vh;     /* mobile-safe */
  font-size: 1rem;     /* base text size */
}

.leaflet-popup-close-button {
  font-size: 1.6rem;      /* icon size */
  width: 2.25rem;
  height: 2.25rem;
  line-height: 2.25rem;
      /* centers the × */
}




/* =========================
   ABOUT DROPDOWN PANEL
   ========================= */

.about-panel {
  position: absolute;
  top: var(--navbar-height);       
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  z-index: 2000;

  max-height: 100vh;
  overflow-y: auto;
}

.about-content {
  max-width: 75vw;
  margin: 0 auto;
  padding: 20px 24px;
  font-family: sans-serif;
  line-height: 1.5;
}

.about-content h2 {
  margin-top: 0;
}

.about-content hr {
  margin: 20px 0;
}

.about-meta {
  font-size: 0.85em;
  color: #666;
}

/* =========================
   EDITOR PANEL (matches search-panel behavior)
   ========================= */
/* =========================
   EDITOR PANEL (matches search-panel look/behavior)
   ========================= */

#edit-dropdown {
  display: none;              /* editor.js should set to block when opened */
  position: absolute;
  top: var(--navbar-height);                /* must match #navbar height */
  left: 0;
  right: 0;
  bottom: 0;

  background: #fff;
  border-bottom: 1px solid #ccc;
  padding: 12px;
  box-sizing: border-box;

  z-index: 1600;              /* above map; similar tier to search */
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);

  overflow-y: auto;
  overflow-x: hidden;
}

/* Header row */
#edit-dropdown .editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: sans-serif;
}

#edit-dropdown .editor-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

/* Close button */
#editor-close {
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1;
}

/* Form fields */
#edit-dropdown .editor-field {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: sans-serif;
}

#edit-dropdown .editor-field label {
  font-size: 14px;
  font-weight: 600;
}

/* Inputs + textarea */
#edit-dropdown .editor-field input,
#edit-dropdown .editor-field textarea {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  font-family: sans-serif;

  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

#edit-dropdown .editor-field textarea {
  resize: vertical;
}

/* EDITOR SECTION TAGS CONTAINER */
#editor-tags-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 4px;
}

.label-editor-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin-right: 16px;
}


.tag-editor-checkbox {
  margin: 0; 
}






/* =========================
   VISIBILITY CONTROL
   ========================= */

.hidden {
  display: none;
}








