
html,
body,
#map {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

#threejs-container {
  width: 100%;
  height: 100%;
}
.marker {
  display: block;
  border: none;
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
  padding: 0;
  background-size: contain;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  box-sizing: border-box;
}

#overlay-left {
  width: 100%;
  height: 100%;
  background-color: #f9fafb;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

#overlay-right {
  width: 100%;
  height: 100%;
  padding: 1rem;
  background-color: #ffffff;
  overflow-y: auto;
  border-left: 1px solid #e5e7eb;
  box-sizing: border-box;
}

#overlay-right h3 {
  /* font-size: 1.25rem; */
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#image-description {
  /* font-size: 0.95rem; */
  color: #374151;
  /* line-height: 1.5; */
  margin-right: 40px;
}

iframe {
  width: 100%;
  height: 80%;
  max-height: 100%;
  border: none;
  border-radius: 0.5rem;
  object-fit: cover;
}

#overlay-content {
  height: 100%;
}

#overlay-content iframe {
  height: 100%;
  width: 100%;
  border: none;
  border-radius: 0.5rem;
}

#threejs-container-wrapper {
  min-height: 400px;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.nav-button {
  position: absolute;
  background-color: #111827;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.25rem;
  border-radius: 0.375rem;
  z-index: 1010;
  transition: background 0.2s;
}

.nav-button:hover {
  background-color: #1f2937;
}

#closeBtn {
  top: 10px;
  right: 10px;
}

#prevBtn,
#nextBtn {
  transform: translateY(-50%);
}

#prevBtn {
  left: 10px;
}

#nextBtn {
  right: 10px;
}

ul {
list-style-type: disc;
padding-left: 1.5em;
margin-top: 0.5em;
}
li {
margin-bottom: 0.5em;
}


/* Overlay styles for the camp view */

#camp-overlay.show {
  display: grid;
  pointer-events: auto;
}

#camp-overlay-content {
  /* height: 100%; */
}

#camp-overlay-left {
  /* width: 65%; */
  padding: 1rem;
  background-color: #f9fafb;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

img.camp-image {
  max-width: 100%;
  max-height: 85%;
  height: auto;
  object-fit: contain;
  display: block;
}


#camp-media-container {
  width: 100%;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  flex-grow: 1;
  position: relative;
}

#media-wrapper {
  width: 100%;
  flex: 1;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camp-image,
#camp-iframe {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#camp-caption {
  margin-top: 0.5rem;
  /* font-size: 0.9rem; */
  text-align: center;
  color: #4b5563;
  padding: 0 1rem;
  max-height: 3rem;
  overflow-y: auto;
}



#camp-overlay-right {
  /* width: 35%; */
  padding: 1rem;
  background-color: #ffffff;
  border-left: 1px solid #e5e7eb;
  box-sizing: border-box;
  overflow-y: auto;
}

#camp-overlay-right h3 {
  /* font-size: 1.25rem; */
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#camp-overlay-headline {
  /* font-size: 36px;  */
  color: #1a202c; 
  font-weight: bold; 
  margin-top: 20px; 
  line-height: 1.5; 
  margin-right: 10%;
}

#camp-description {
  /* font-size: 0.95rem; */
  color: #374151;
  line-height: 1.5;
  margin-right: 15%;
  margin-top: 5%;
}

#camp-iframe {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


#camp-closeBtn {
  top: 10px;
  right: 10px;
  position: absolute;
  margin-top: 1rem;
  background-color: #e5e7eb;
  color: #374151;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
}

#camp-closeBtn:hover {
  background-color: #d1d5db;
}

.model-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  gap: 10px;
  position: relative;
}

/* Hide the native checkbox */
.model-toggle input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

/* The slider track */
.model-toggle .slider {
  position: relative;
  width: 40px;
  height: 20px;
  background-color: #ccc;
  border-radius: 20px;
  transition: background-color 0.3s;
}

/* The circle knob */
.model-toggle .slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

/* Checked state: track background */
.model-toggle input:checked + .slider {
  background-color: #2196F3;
}

/* Checked state: move the knob */
.model-toggle input:checked + .slider::before {
  transform: translateX(20px);
}



/* Overlay styles for the convent view */

#convent-overlay.show {
  pointer-events: auto;
  display: grid;
}

#convent-overlay-content {
  height: 100%;
}

#convent-overlay-left {
  /* width: 60%; */
  padding: 1rem;
  background-color: #f9fafb;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
}

#convent-overlay-right {
  /* width: 40%; */
  padding: 1rem;
  background-color: #ffffff;
  border-left: 1px solid #e5e7eb;
  box-sizing: border-box;
  overflow: hidden;
  overflow-y: scroll;
}

#convent-overlay-right h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#convent-description {
  color: #374151;
  line-height: 1.5;
  margin-right: 10%;
  margin-left: 10%;
}

#convent-headline {
  color: #1a202c; 
  font-weight: bold;
  margin-top: 20px; 
  text-align: center; 
  line-height: 1.5; 
  margin-right: 10%;
}

#convent-subtitle {
  font-size: 16px; 
  color: #333333; 
  font-style: italic; 
  margin-top: 5px; 
  margin-bottom: 10px; 
  text-align: center; 
  font-weight: normal; 
  line-height: 1; 
}

#convent-iframe {
  width: 100%;
  height: 80%;
  max-height: 100%;
  border: none;
  border-radius: 0.5rem;
  object-fit: cover;
}

#convent-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

#convent-media-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center contents vertically */
  flex: 1; /* Let it expand inside parent */
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

#convent-image,
#convent-media-container img {
  width: 100%;
  height: auto;
  max-width: 600px; /* Optional: keep it from being too wide */
  object-fit: contain; /* or cover if you want it cropped */
  border-radius: 0.5rem;
}

.image-caption {
  margin-top: 0.5rem;
  font-size: 0.9em;
  color: #555;
  text-align: center;
  font-style: italic;
}

#convent-closeBtn {
  top: 10px;
  right: 10px;
  position: absolute;
  margin-top: 1rem;
  background-color: #e5e7eb;
  color: #374151;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
}

#convent-closeBtn:hover {
  background-color: #d1d5db;
}

.annotation {
  position: absolute;
  background: white;
  padding: 5px;
  border: 1px solid black;
  cursor: pointer;
  font-size: 0.85rem;
  border-radius: 5px;
  z-index: 1001;
}

/* Container bar */
.slider-background-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: min-content;
  background-color: rgba(255, 255, 255, 0.75);
  padding: 5px 0;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main slider wrapper */
.timeline-slider {
  position: relative;
  width: 80%;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto 25px auto;
  align-items: center;
  justify-items: center;
  /* margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center; */
}

/* Range slider */
.timeline-slider input[type="range"] {
  grid-row-start: 2;
  grid-column: 1 / span 3;
  /* position: absolute; */
  margin: 0 12px;
  padding: 0;
  /* top: 25px; */
  width: 100%;
  z-index: 1;
  height: 6px;
  background: linear-gradient(to right, #797777 0%, #797777 100%);
  border-radius: 3px;
  appearance: none;
  outline: none;
  cursor: pointer;
}

/* WebKit thumb */
.timeline-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-left: 0;
  margin-right: 0;
  background: #333;
  cursor: pointer;
  position: relative;
  z-index: 3;
  transition: background 0.3s ease;
}
.timeline-slider input[type="range"]::-webkit-slider-thumb:hover {
  background: #555;
}

/* Firefox thumb */
.timeline-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  position: relative;
  z-index: 3;
  transition: background 0.3s ease;
}
.timeline-slider input[type="range"]::-moz-range-thumb:hover {
  background: #555;
}

/* Tick container */
.timeline-ticks {
  display: flex;
  justify-content: space-between;
  width: 100%;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.tick-container {
  display: grid;
  grid-template-columns: 1;
  grid-template-rows: [auto 30px auto];
  text-align: center;
  align-items: center;
  /* flex: 0.1;
  display: flex;
  flex-direction: column;
  pointer-events: none; */
}

.tick-container:first-of-type {
  align-items: flex-start;
}
.tick-container:last-of-type {
  align-items: flex-end;
}

/* Tick line that crosses the slider */
.tick-line {
  width: 2px;
  height: 25px
  /* background-color: black; */
  /* margin: 5px 0; */
}

/* Labels */
.tick-label.top {
  margin-bottom: 0px;
  font-weight: italic;
  text-wrap-mode: nowrap;
}
.tick-label.bottom {
  margin-top: 0px;
  font-weight: bold;
}

#overlay-info-box {
  position: absolute;
  top: 3%;
  left: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  max-width: 300px;
  z-index: 1000;
  height: auto;
  max-height: 7000px;
  background-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
  transition: max-height 0.4s ease;
}

#overlay-info-box.close {
  max-height: 7em;
}

#overlay-info-title {
  font-weight: bold;
  text-align: center;
  margin-bottom: 0.2em; 
}

#overlay-info-subtitle {
  font-weight: normal;
  text-align: center;
  font-style: italic; /* optional to differentiate subtitle */
  margin-top: 0;
  margin-bottom: 0.6em;
  color: #555; /* a subtle color for subtitle */
}

.maplibregl-ctrl-bottom-right {
  z-index: 9000;
}

.overlay {
  display: grid;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: 70%;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-family: "Inter", sans-serif;
  grid-template-rows: 65% 35%;
  grid-template-columns: 1fr;
  transition: none !important;
}

@media (min-width: 1024px) {
  .overlay {
    grid-template-rows: 1fr;
    grid-template-columns: 65% 35%;
  }
}

.hide {
  display: none;
}