/* HEADER WRAPPER*/
.map-header-wrapper {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  transition: transform 0.4s ease;
  z-index: 1000;
}

.map-header-wrapper.collapsed {
  transform: translateX(-105%);
}

.map-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  width: 95.5%;
  box-sizing: border-box;
}

/* TOGGLE BUTTON */
.map-toggle-btn {
  position: absolute;
  top: 18px;
  right: 12px;
  z-index: 1101;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ccc;
  border-radius: 50%;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
}

.map-toggle-btn.rotate {
  transform: rotate(180deg);
}

/* COORDS DISPLAY */
.coords {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* SEARCH TOOLS */
.map-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* SEARCH INPUT */
.map-search-input {
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease;
}

.map-search-input:focus {
  border-color: var(--primary-color);
}

/* ICON BUTTONS */
.map-icon-btn {
  background: #ffffff;
  border: 1px solid #ccc;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.map-icon-btn:hover {
  background: #f1f1f1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

button.map-icon-btn:disabled {
  background: #f1f1f1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
  transform: scale(0.96);
  cursor: not-allowed;
  opacity: 0.7;
}

/* DIVIDER */
.search-divider {
  width: 1px;
  height: 24px;
  background-color: #ccc;
  margin: 0 5px;
}

/* SUGGESTION BOX */
.suggestion-box {
  position: absolute;
  display: none;
  top: 45px;
  background: white;
  border: 1px solid #ccc;
  width: 200px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 999;
  -webkit-overflow-scrolling: touch;
}

.suggestion-item {
  display: flex;
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

.suggestion-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.suggestion-info {
  display: flex;
  flex-direction: column;
}

.suggestion-name {
  font-weight: bold;
}

.suggestion-dob {
  font-size: 0.85em;
  color: #666;
}

.map-result-panel {
  margin-top: 5px;
  padding: 5px 10px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  display: none;
}

.map-result-panel.show {
  display: block;
}

/*MGA GIN ADD KO */

/* Bounce animation */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px); /* or -10px if you want it stronger */
  }
}

/* bounce Marker*/
.bouncing-img {
  animation: bounce 1s infinite;
  position: relative;
}
/* Tooltip styling for "Start" and "Grave Location" */
.custom-tooltip {
  background-color: transparent !important; /* Keep container transparent */
  border: none !important;
  box-shadow: none !important; 
  padding: 0;
}

.custom-tooltip span {
  display: inline-block;
  animation: bounce 1s infinite;
  background-color: #b7e4dc;
  color: black;
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* DASH LINE ANIMATION */
.draw-line {
  stroke-dasharray: 10, 10;
  animation: dash 1s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -20;
  }
}

/* MAP OVERLAY */
.map-layer-control {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column-reverse;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: transparent;
  gap: 16px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  color: #333;
}
.map-thumb-container {
  width: 80px;
  height: 80px;
  background: transparent;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 2px solid#fbfffe;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease border-color 0.3s ease, border-width 0.3s ease;
}
.map-thumb-container:hover {
  border-color: #007bff;
  border-width: 3px;
}

.map-thumb-container::after {
  content: attr(title);
  display: block;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(5px);
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  font-size: 17px;
  font-style: italic; /* optional, for italic text */
  -webkit-text-stroke: 0.4px white; /* black border around text */
  color: black; /* text color inside stroke */
  font-weight: 600;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  pointer-events: none;
  font-weight: 500;
}
.map-thumb-container:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.map-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none; /* prevent blocking clicks when hidden */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map-options.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Add a transition for the switch-thumb */
.switch-thumb {
  z-index: 10;
}

/* remove the box outline in clicking tomb */
.leaflet-interactive:focus {
  outline: none;
}

.leaflet-tile {
  transition: opacity 0.3s ease-in-out !important;
}
#map {
  border: 4px solid #ccc;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
#MapContainer {
  border-radius: 4px;
}
