/* ===== GENERAL STYLES ===== */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #ffffff;
  color: #000000;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: background-color 0.5s, color 0.5s;
  height: 100vh;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== VERTICAL NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background: #050b14;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  z-index: 1003;
  transition: transform 0.3s ease-out, height 0.3s ease;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
}

.navbar .profile-picture-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.navbar .profile-picture {
  width: 120px;
  height: 150px;
  border-radius: 50%;
  margin-top: 20px;
  margin-bottom: 20px;
  border: 2px solid #ffd700;
  object-fit: cover;
}

.navbar .profile-name {
  font-size: 22px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 20px;
  text-align: center;
}

.navbar .social-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.navbar .social-buttons a {
  color: #ffffff;
  font-size: 20px;
  transition: color 0.3s;
}

.navbar .social-buttons a:hover {
  color: #53a9e1;
}

.navbar .nav-links {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.navbar .nav-links a {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.navbar .nav-links a i {
  font-size: 20px;
  color: #ffffff;
  transition: color 0.3s;
}

.navbar .nav-links a:hover {
  color: #ffd700;
}

.navbar .nav-links a:hover i {
  color: #53a9e1;
}

.navbar .nav-links a.active {
  color: #ffd700;
  font-weight: 600;
}

.navbar .nav-links a.active i {
  color: #ffd700;
}

/* ===== NAVBAR TOGGLE BUTTONS ===== */
.navbar-toggle,
.replacement-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 45px;
  height: 45px;
  background: #050b14;
  border: 2px solid #ffd700;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
  transition: all 0.3s ease;
}

.navbar-toggle:hover,
.replacement-toggle:hover {
  color: #53a9e1;
  border-color: #53a9e1;
}

.navbar-toggle i,
.replacement-toggle i {
  font-size: 20px;
}

.navbar.hidden {
  transform: translateX(-470px); 
}

.replacement-toggle {
  opacity: 0;
  visibility: hidden;
}

.replacement-toggle.visible {
  opacity: 1;
  visibility: visible;
}

/* ===== VACATIONS TOGGLE BUTTON (Suitcase) ===== */
.vacations-toggle {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #050b14;
  border: 2px solid #ffd700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1004;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vacations-toggle:hover {
  background: #ffd700;
}

.vacations-toggle:hover i {
  color: #050b14;
}

.vacations-toggle i {
  color: #ffd700;
  font-size: 24px;
  transition: all 0.3s ease;
}

/* Hide vacations toggle when panel is open */
.discoveries-open .vacations-toggle {
  display: none;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  position: fixed;
  top: 0;
  left: 250px;
  right: 0;
  bottom: 0;
  transition: left 0.3s ease, right 0.3s ease;
  z-index: 1;
}

.main-content.navbar-hidden {
  left: 0;
}

.discoveries-open .main-content {
  right: 350px;
}

/* ===== MAP CONTAINER ===== */
#map-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ===== DISCOVERIES PANEL (RIGHT SIDE) ===== */
.discoveries-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100vh;
  background: rgba(5, 11, 20, 0.98);
  color: #ffffff;
  z-index: 1002;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  border-left: 3px solid #ffd700;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
}

.discoveries-panel.open {
  transform: translateX(0);
}

/* NEW: Discoveries Close Toggle (Arrow Right) - Bottom Right Position */
.discoveries-toggle-close {
  position: absolute;
  bottom: 20px; /* Moved to bottom */
  right: 20px;  /* Moved to right */
  width: 45px;
  height: 45px;
  background: #050b14;
  border: 2px solid #ffd700;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1100;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* Added shadow to pop against list */
}

.discoveries-toggle-close:hover {
  color: #53a9e1;
  border-color: #53a9e1;
}

.discoveries-toggle-close i {
  font-size: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px; /* Reset to standard padding */
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  flex-shrink: 0;
}

.panel-header h3 {
  margin: 0;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
}

/* Vacations List */
.vacations-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  height: calc(100% - 70px);
  padding-bottom: 80px; /* Add padding so last item isn't covered by button */
}

.vacations-list::-webkit-scrollbar {
  width: 8px;
}

.vacations-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.vacations-list::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 4px;
}

.vacation-item {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.vacation-item:hover {
  background: rgba(255, 215, 0, 0.1);
}

.vacation-item.active {
  background: rgba(255, 215, 0, 0.2);
  border-left: 4px solid #ffd700;
}

.vacation-item:last-child {
  border-bottom: none;
}

.vacation-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #050b14;
  flex-shrink: 0;
}

.vacation-info {
  flex: 1;
  min-width: 0;
}

.vacation-info h4 {
  margin: 0 0 5px 0;
  color: #ffd700;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vacation-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vacation-count {
  background: #ffd700;
  color: #050b14;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

/* ===== LEAFLET CONTROLS ===== */
.leaflet-control-zoom {
  border: 2px solid #ffd700 !important;
  border-radius: 5px !important;
  overflow: hidden !important;
  margin-top: 10px !important;
  margin-right: 10px !important;
}

.leaflet-control-zoom a {
  background-color: #050b14 !important;
  color: #ffd700 !important;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
}

.leaflet-control-zoom a:hover {
  background-color: rgba(255, 215, 0, 0.1) !important;
}

.leaflet-control-zoom a:last-child {
  border-bottom: none !important;
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
  background: #050b14 !important;
  color: #ffffff !important;
  border: 2px solid #ffd700 !important;
  border-radius: 12px !important;
  padding: 5px !important;
}

.leaflet-popup-tip {
  background: #050b14 !important;
  border: 2px solid #ffd700 !important;
}

.leaflet-popup-content {
  font-family: 'Poppins', sans-serif !important;
  margin: 20px !important;
  max-width: 300px;
}

.popup-header {
  color: #ffd700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.popup-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
}

.popup-description {
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

.popup-vacation {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #050b14;
  border: 3px solid #ffd700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

.dark-mode-toggle i {
  font-size: 24px;
  color: #ffd700;
  transition: color 0.5s;
}

.dark-mode-toggle:hover i {
  color: #53a9e1;
}

/* When discoveries panel is open, move dark mode toggle */
.discoveries-open .dark-mode-toggle {
  right: 370px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar {
    width: 250px;
  }
  
  .navbar-toggle, .replacement-toggle {
    left: 15px;
    bottom: 15px;
  }
  
  .vacations-toggle {
    bottom: 85px;
    right: 15px;
  }
  
  .dark-mode-toggle {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
  
  .discoveries-open .dark-mode-toggle {
    right: 15px;
  }
  
  .main-content {
    left: 0;
  }

  .main-content.navbar-hidden {
    left: 0;
  }
  
  .navbar {
    transform: translateX(-100%);
  }
  
  .navbar:not(.hidden) {
    transform: translateX(0);
  }

  .discoveries-panel {
    width: 100%;
    transform: translateX(100%);
  }
  
  .discoveries-panel.open {
    transform: translateX(0);
  }
  
  .discoveries-open .vacations-toggle {
    display: none;
  }
}