#park-overview > p{
  font-style: italic;
}

.campsite-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem auto;
  max-width: 1200px;
  width: 90%;
}

.campsite-list li {
  background: var(--white);
  padding: 4px 8px;
  border-radius: 4px;
  border: 2px solid var(--light-brown);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: #00000036 0px 4px 4px;
  position: relative;
  /* white-space: normal; */
  /* overflow-wrap: break-word; */
  /* ********** */
  /* white-space: nowrap; */
  /* overflow: hidden; */
  /* text-overflow: ellipsis; */
  /* ************ */
  display: -webkit-box;
  -webkit-line-clamp: 3;     /* max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* text-overflow: ellipsis; */
  white-space: normal;
}



.campsite-list li:hover {
  overflow: visible;
  white-space: normal;
  background: var(--white);
  z-index: 10;
  position: relative;
  text-overflow: unset;
}

/* For campsite cell with longer text */
.campsite-list.long-text li:hover {
  width: fit-content;
}

.campsite.has-media {
  background: var(--light-brown);
  border: 2px solid var(--brown);
}
.campsite.no-media {
  /* background: #f8f8f8; */
  /* border: 1px solid #ccc; */
}

.campsite-media-inner {
  width: 100%;
  overflow: hidden; /* Prevent horizontal creep */
}

.media-badge {
  background: var(--orange);
  color: #fff;
  font-size: 0.75em;
  width: 10px;
  height: 10px;
  padding: 6px;
  line-height: 10px;
  border-radius: 50%;
  /* display: flex; */
  justify-content: center;
  align-items: center;
  font-size: var(--font-extra-extra-small);
  position: absolute;
  top: 0;
  right: 0px;
  display: none;
  /* margin-left: 6px; */
}

.campsite-list li:hover .media-badge{
  display: flex;
}

@media (max-width: 800px) {
  .campsite-list {
    /* grid-template-columns: repeat(7, 1fr); */
    max-width: 1200px;
  }
}

@media (max-width: 500px) {
  .campsite-list {
    /* grid-template-columns: repeat(5, 1fr); */
  }
}

.campsite-list li:hover {
  /* background: var(--yellow); */
  border-color: var(--brown);
}

/* CAMPSITE POPUP */
#campsite-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  /* backdrop-filter: blur(6px); */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  /* transition: opacity 0.25s ease; */
  overflow: hidden; /* prevent the overlay itself from scrolling */
}

/* #campsite-popup.hidden {
  display: none;
} */

#campsite-popup.visible {
  opacity: 1;
  pointer-events: auto;
}

#campsite-popup.visible .popup-inner {
  transform: translateY(0);
}


.popup-inner {
  display: flex;
  flex-direction: column;
  background:  var(--white);
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: translateY(10px);
  /* transition: transform 0.25s ease; */
}

#popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.close-campsite-modal {
  position: absolute;
  top: 20px;
  right: 12px;
}
/* .close-campsite-modal:hover {
  color: var(--orange);
} */


.popup-content {
  /* display: flex; */
  /* flex: 1; */
  /* flex-direction: column; */
  /* gap: 1rem; */
  /* overflow-y: auto; */
  /* padding: 1rem; */
  /* border-bottom: 1px solid #ddd; */
  height: 50vh;


  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 1rem;
  border-bottom: 1px solid #ddd;

  /* REMOVE THESE ↓ */
  /* overflow-y: auto; */
  /* height: 50vh; */

  /* Let it size naturally inside popup-inner */
  flex-grow: 1;
  overflow: hidden; /* prevents scrollbars */
}

/* MEDIA section layout */
.media-section {
  display: flex;
  flex-grow: 1;
  gap: 1rem;
  overflow: hidden; /* contain thumbs scroll only */
}

.media-thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 25%;
  overflow-y: auto;
  max-height: 100%; /* use available height inside popup-content */
  padding-right: 4px; /* avoid scrollbar overlap */
}

.media-thumb-div,
.media-item{
  position: relative;
}

.media-thumb-delete {
  width: 22px;
  height: 22px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  position: absolute;
  top: 6px;
  right: 6px;
  transition: background 0.2s ease;
  z-index: 10;
}

.media-thumb-delete:hover {
  background: rgba(255, 0, 0, 1);
}

/* For admin: other people's photos */
.media-thumb-delete.admin-delete {
  background: rgb(17, 0, 255);
}
.media-thumb-delete.admin-delete:hover {
  background: rgb(230, 255, 2);
}

.media-thumbs img {
  width: 100%;
  height: 100px;
  border-radius: 4px;
  cursor: pointer;
  object-fit: cover;
}

.media-thumbs img:hover {
  /* transform: scale(1.05); */
  /* z-index: 1; */
}

.media-preview {
  width: 75%;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.preview-media-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-height: 100%;
  overflow: hidden;
}

.preview-media-wrapper img {
  /* max-width: 90%; */
  max-height: calc(100% - 2.5em); /* limit inside popup */
  object-fit: contain;
  border-radius: 6px;
  cursor: pointer;
}

.preview-media-wrapper iframe {
  max-width: 100%;
  max-height: 60vh; /* limit inside popup */
  object-fit: contain;
  border-radius: 6px;
}

.report-btn {
  position: relative;
  justify-self: center;
  bottom: 0;
  right: 0;
  padding: 10px;
  background-color: var(--light-brown);
  border-radius: 3px;
  cursor: pointer;
  transition: all ease 0.5s;
  margin: auto;
  width: fit-content;
}

.report-btn:hover {
  background-color: var(--orange);
}


.media-caption {
  font-size: 0.9em;
  color: var(--light-brown);
  margin-top: 8px;
  text-align: center;
  font-style: italic;
  line-height: 1.3em;
  flex-shrink: 0; /* prevent it from shrinking or forcing scroll */
}

/* Full screen media captions */
.overlay-media-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto;
  max-width: 90%;
}

.overlay-media-wrapper img,
.overlay-media-wrapper iframe {
  display: block;
  margin: 0 auto;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
}

.overlay-caption {
  margin-top: 12px;
  font-size: 1rem;
  color: #ccc;
  font-style: italic;
  max-width: 90%;
  line-height: 1.4em;
}



.reviews-section {
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}
.review {
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}


@media (max-width: 700px) {
  iframe {
    width: 95% !important;
    height: 75% !important;
  }
}

/* ======= Video thumbnail overlay ======= */
.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,0.6);
  mask: url('/images/icons/play.png') center/contain no-repeat;
  -webkit-mask: url('/images/icons/play.png') center/contain no-repeat;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

/* PARK MEDIA UPLOAD */
.park-media-upload-modal{
  background: var(--eggshell);
  /* backdrop-filter: blur(12px); */
  min-width: 400px;
  padding: 2rem 1.8rem;
  animation: fadeIn 0.3s ease-out;
  max-width: 90vw;
  box-sizing: border-box;
  height: 100%;
  /* overflow-y: auto; */
}

/* CAMPSITE MEDIA UPLOAD */
#campsite-modal{

}

.campsite-modal-wrapper {
  background: var(--eggshell);
  position: relative;
  /* backdrop-filter: blur(12px); */
  /* min-width: 400px; */
  padding: 2rem 1.8rem;
  animation: fadeIn 0.3s ease-out;
  width: calc(95vw - 180px);
  max-width: 1200px;
  box-sizing: border-box;
  max-height: 85vh;      /* <— instead of height: 100% */
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.campsite-modal-wrapper > div {
  overflow-y: auto;
  
}

/* Thumbs inside modal shouldn't be 100vw */
.campsite-modal-wrapper .thumbs-container-campsite {
  width: 100%;
  max-width: 100%;
}

/* Upload section only takes remaining vertical space and scrolls if needed */
.campsite-modal-wrapper .upload-section {
  flex: 0 0 auto;
  max-height: 35vh;
  /* overflow-y: auto; */
}

/* Media block gets top of modal; allow it to shrink */
.campsite-media-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}


.campsite-modal-wrapper .btn {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 769px) {
  .campsite-modal-wrapper  {
    width: calc(95vw - 30px);
  }
}
@media (max-width: 576px) {
  .campsite-modal-wrapper  {
    /* padding: 0.1rem 1rem; */
  }
}

/* GENERAL - UPLOAD FORM */
/* .upload-form{ */
  /* display: flex; */
  /* justify-content: center; */
  /* align-items: center; */
  /* flex-direction: column; */
/* } */

/* === Upload Section Layout === */
#park-media{
  margin-top: 100px;
}

.upload-section {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  /* gap: 1.5rem; */
  /* padding: 1.2rem; */
  /* background: #fafafa; */
  /* border-top: 1px solid #ddd; */
  box-sizing: border-box;
  /* overflow-y: auto; */
  height: 100%;
}

#park-media-upload .upload-section{
  overflow-y: auto;
}

/* === Individual Form Box === */
.upload-form {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
  /* gap: 0.8rem; */
  /* background: #fff; */
  /* border: 1px solid #ddd; */
  /* border-radius: 8px; */
  padding: 1rem 1.2rem;
  /* box-shadow: 0 2px 5px rgba(0,0,0,0.05); */
  /* transition: transform 0.2s ease, box-shadow 0.2s ease; */
  margin: 5px;
  box-sizing: border-box;
  justify-content: space-between;
}

.upload-form:hover {
  /* transform: translateY(-2px); */
  /* box-shadow: 0 4px 10px rgba(0,0,0,0.1); */
}

.upload-form h3 {

  /* margin-top: 0; */
  /* font-size: 1.1rem; */
  /* color: #333; */
  /* border-bottom: 2px solid var(--blue-info); */
  /* padding-bottom: 0.3rem; */
  text-align: center;
  color: var(--orange);
}

/* Label/Input consistency */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 4px;
  /* color: #222; */
}


/* Checkbox alignment */
.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  width: 100%;
}

/* Responsive stack on small screens */
@media (max-width: 800px) {
  .media-section{
    flex-direction: column-reverse;
    justify-content: center;
    align-items: center;
  }
  .media-thumbs{
    flex-direction: row;
    overflow-x: scroll;
    overflow-y: hidden;
    height: 25%;
    width: 100%;
  }
  .media-thumb-div{
    height: 100%;
    box-sizing: border-box;
  }
  .media-thumb-div img{
    width: 100px;
    height: 100%;
  }
  .media-preview{
    height: 75%;
    width: 95%;
  }

  /* Allow scrolling in the popup when in mobile, for easier use (uploading, etc) */
  .popup-inner{
    overflow-y: scroll;
  }

  .upload-section {
    /* flex-direction: column; */
    padding: 1rem;
    /* max-height: 30vh; */
    /* overflow-y: unset; */
    flex-wrap: wrap;
  }
  .upload-form {
    flex: 1 1 100%;
  }

  .upload-form input:not([type="checkbox"]){
    box-sizing: border-box;
    width: 100%;
  }
}

/* FOR SWIPER SLIDER */
/* SWIPER - PARK VIEW */
.swiper-slide{
  position: relative;
}

#park-media-slider {
  width: 100%;
  margin: -125px auto 0 auto;
  position: relative;
}

.tear-top {
  width: 100%;
  z-index: 2;
  position: absolute;
}
.tear-bottom {
  width: 100%;
  position: absolute;
  bottom: -2px;
  left: 0px;
  z-index: 2;
  display: flex;
}

[data-theme="dark"] .tear-top img{
  content: url('/images/partials/park-page-nav-ripped-dark.png');
}

[data-theme="dark"] .tear-bottom img{
  content: url('/images/partials/content-top-ripped-dark.png');
}

.parkSwiper {
  width: 100%;
  height: 70vh;
  position: relative;
  min-height: 500px;
}

.parkSwiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  flex-direction: column;
  cursor: pointer;
}

.swiper-button-next,
.swiper-button-prev {
  display: none !important;
}

/*  */
.parkSwiper img:not(.magnifying),
.parkSwiper iframe {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.parkSwiper iframe {
  max-width: 100%;
  max-height: 50%;
  border: none;
}

/* SWIPER - CAMPSITE VIEW */
/* Swiper height inside modal */
.campsiteSwiper {
  width: 100%;
  height: 45vh;
  background: #000;
  margin-bottom: 10px;
}

.campsiteSwiper img,
.campsiteSwiper iframe {
  width: 100%;
  height: 85%;
  /* border-radius: 6px; */
  object-fit: cover;
}

.campsiteSwiper .swiper-slide {
  box-sizing: border-box;
  max-width: 100% !important;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.campsiteSwiper .swiper-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
  #park-media-slider{
    margin-top: -75px;
  }
}

/* --- Thumbs --- */
.thumbs-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  overflow: hidden;
  /* width: 100vw; */
}

#park-media-slider .thumbs-container {
  width: 100%;
}

/* SWIPER - OTHER MISC */
img.magnifying{
  position: absolute;
  width: 5vw;
  height: 5vw;
  min-width: 50px;
  min-height: 50px;
  opacity: 0;
  pointer-events: none !important;
  -webkit-transition: .4s ease-in-out opacity; 
  -moz-transition: .4s ease-in-out opacity;
  -o-transition: .4s ease-in-out opacity;
  transition: .4s ease-in-out opacity;
}

.swiper-slide:hover .magnifying{
  opacity: 1;
}

.swiper-slide img.photo{
  transition: 0.2s -webkit-filter linear;
}

.swiper-slide:hover img.photo{
  filter: contrast(50%) brightness(95%);
}

/* THUMBNAILS */

.thumbs-container-campsite {
  width: 100%;
}


.thumbs-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  align-items: center;
  max-width: 90vw;
}

.thumbs-wrapper::-webkit-scrollbar {
  height: 6px;
}

.thumbs-wrapper img {
  height: 70px;
  width: 110px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  box-shadow: #0000003b 0px 4px 4px;
}

.thumbs-wrapper img.active {
  border: 3px solid var(--blue-info);
  opacity: 1;
  width: 85px;
  height: 80px;
  border: 2px solid var(--orange);
}

.thumb-nav {
  border: none;
  background: none;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--brown);
}

.thumb-nav[disabled] {
  opacity: 0.4;
  cursor: default;
}


.thumb-wrapper {
  flex: 0 0 80px;   
  position: relative;
  display: inline-block;
}
.thumb-wrapper img {
  display: block;
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}

img.low-resolution, div.low-resolution img:not(.magnifying){
  width: unset;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" viewBox="0 0 100 100" xml:space="preserve"><style type="text/css">.blur{filter:url(%23softedge);}</style><filter id="softedge"><feGaussianBlur stdDeviation="3.5"></feGaussianBlur></filter><g class="blur"><rect x="10" y="10" width="80" height="80"/></g></svg>'); 
  /* -webkit-mask-size: cover;  */

}