/* --- Modal Styles for Date Picker --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 60, 90, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: rgba(255,255,255,0.98);
  border: 2px solid #43cea2;
  box-shadow: 0 8px 32px rgba(24,90,157,0.18);
  border-radius: 22px;
  padding: 32px 38px 24px 38px;
  text-align: center;
  max-width: 340px;
  width: 90vw;
}
.modal-actions button {
  margin: 10px 8px;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 18px;
  border: none;
  background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(67,206,162,0.12);
  transition: background 0.2s, box-shadow 0.2s;
}
/* style.css - Final Version with Correct Map Layering and Side Panel */

@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
  width: 100%;
  overflow-x: hidden;
}
body {
  background: transparent;
  font-family: Arial, sans-serif;
}

.page-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  padding: 16px 0;
  pointer-events: none;
}
.page-header * {
  pointer-events: auto;
}

.page-header h1 {
  font-family: 'Pacifico', cursive;
  margin: 0 0 0 12px;
  color: #FFDFA0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.page-header h1::after {
  content: "";
  display: block;
  width: 120px;
  height: 12px;
  margin: 15px auto 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 12"><path fill="%23F2C777" d="M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6 L120 12 L0 12 Z"/></svg>') no-repeat center;
}

.page-header h2 {
  margin: 0 0 25px;
  color: #FFFCF2;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 0, 0, 0.3);
  font-weight: 300;
}

.page-header .mission-btn {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  color: #234E70;
  border: none;
  border-radius: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  align-self: center;
  padding: 12px 30px;
}

#map {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}



/* InfoWindow Styles */
.gm-style-iw {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding-top: 0 !important;
  margin-top: 20px !important;
  width: 380px !important;
  min-width: 320px !important;
  z-index: 100 !important;
}
.gm-style-iw > div {
  background: #fff;
  border-radius: 6px;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  margin-top: 0 !important;
}
.info-section {
  padding: 8px;
  font-size: 19px;
  width: 100%;
}
.info-header {
  position: relative;
  background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=800&q=60') center/cover no-repeat;
  padding: 8px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  margin: -8px -8px 8px;
}
.info-title {
  font-size: 25px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  margin: 0;
}
.info-exit-btn {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 20px;
  color: #fff;
  background: rgba(0,0,0,0.4);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.info-exit-btn:hover {
  background: rgba(0,0,0,0.6);
}
.cleanup-button {
  padding: 7px 14px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
  border: none;
  border-radius: 24px;
  margin: 7px 6px 0 0;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(67,206,162,0.15);
  letter-spacing: 0.5px;
  transition: background 0.2s, box-shadow 0.2s;
}
.cleanup-button:hover {
  background: linear-gradient(90deg, #185a9d 0%, #43cea2 100%);
  box-shadow: 0 4px 16px rgba(24,90,157,0.18);
}

.info-img-beach {
  width: 60%;
  height: auto;
  object-fit: cover;
  border-radius: 0 0 6px 6px;
  margin-top: 10px;
}

.side-panel {
  position: absolute;
  top: 180px;
  bottom: 140px; /* ✅ adds equal space below */
  right: 0;
  width: 320px;
  background: rgba(255,255,255,0.95);
  padding: 16px;
  box-shadow: -2px 0 6px rgba(0,0,0,0.15);
  z-index: 300;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.side-panel.hidden {
  display: none;
}
.side-close-btn {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 40px;
  color: #333;
  cursor: pointer;
  margin-bottom: 8px;
}

@media (max-width: 767px) {
  .page-header {
    padding: 30px 15px;
    min-height: 180px;
  }
  .page-header h1 {
    font-size: 2.4rem;
    line-height: 1.1;
  }
  .page-header h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }
  .mission-btn {
    padding: 12px 28px;
    font-size: 1.1rem;
  }
  .gm-style-iw {
    width: 60vw !important;
    min-width: unset !important;
    max-width: 60vw !important;
    margin-top: 20px !important;;
  }
}
@media (max-width: 600px) {
  .mission-btn {
    width: 90%;
    max-width: 320px;
    font-size: 16px;
    padding: 12px;
  }
}

@media (min-width: 768px) {
  .page-header h1 {
    font-size: 4rem;
  }
  .page-header h2 {
    font-size: 2.2rem;
  }
  .mission-btn {
    padding: 13px 33px;
    font-size: 1.3rem;
  }
}
@media (max-width: 767px) {
  .side-panel {
    top: 200px;
    bottom: -10px;
    width: 45vw;
    max-width: 320px;
  }
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.shake-on-load {
  animation: shake 0.4s ease-in-out 1.2s 2;
}
.map-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: white;
  font-size: 13px;
  z-index: 999;
  text-shadow: 0 0 2px black;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.map-legend img {
  height: 14px;
  vertical-align: middle;
  margin-right: 6px;
}
.map-legend .legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 4px;
}
.map-legend .legend-close {
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
  line-height: 1;
}
.map-legend.hidden {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
}

/* 🌍 toggle icon */
.legend-button {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 18px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  transition: opacity 0.3s ease;
}
.legend-button.hidden {
  display: none;
}
.rating-gauge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px;
}

.gauge-bar {
  flex-grow: 1;
  background: #ddd;
  height: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  transition: width 0.4s ease;
}
.gauge-bar {
  width: 100%;
  height: 10px;
  background-color: #ccc;
  border-radius: 5px;
  margin-top: 5px;
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  transition: width 1s ease-out;
}