@charset "utf-8";
/* CSS Document */

  #map {
    height: 100vh;
  }
  .modal-lg {
    max-width: 95% ;
  }
  .modal-body {
    padding: 2px;
    max-height: 100vh;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
  }
  iframe#iframeContent {
    width: 100%;
    height: 80vh;
    display: block;
  }
  iframe {
    width: 100%;
    height: 90vh;
    border: none;
  }
  .modal-content, .modal-body, iframe {
    height: 95vh;
  }
  .leaflet-tooltip-own {
    background-color: white;
    color: black;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #999;
    transition: opacity 0.2s ease-in-out;
  }

  /* Map UI Overlay */
  .map-ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
	opacity: 0.8;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .map-logo {
    height: 50px;
    width: auto;
  }
  .map-text {
    font-weight: bold;
    white-space: nowrap;
    font-size: 16px;
  }
  @media (max-width: 768px) {
    .map-ui-overlay {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
	  
    }
    .map-text {
      white-space: normal;
    }
    #damSelect {
      width: 100%;
    }
  }

  /* Dot Markers */
  .dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 5px solid white;
  }
  .dot-online {
    background-color: green;
  }
  .dot-offline {
    background-color: tomato;
    animation: blink 0.5s infinite;
  }
  @keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
  }
@keyframes blink-legend {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
  }
  /* Fullscreen Button */
  #fullscreenMapBtn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 1001;
    background: white;
    color: #007bff;
    border: 2px solid #007bff;
    border-radius: 50%;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: background 0.2s ease-in-out;
  }
  #fullscreenMapBtn:hover {
    background: #007bff;
    color: white;
  }
  #fullscreenMapBtn i {
    font-size: 20px;
  }

  /* Legend */
  .legend {
    background: white;
    padding: 10px 14px;
    line-height: 20px;
    color: #333;
    font-size: 13px;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
    max-width: 240px;
  }
  .legend h6 {
    margin: 0 0 5px;
    font-size: 14px;
  }
  .legend i {
    width: 14px;
    height: 14px;
    float: left;
    margin-right: 8px;
    opacity: 1;
    background: #ccc;
    border: 1px solid #666;
  }

  /* Blink animation for legend */
  @keyframes blink-legend { 
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }
.offlineDamsBox {
  position: absolute;
  bottom: 210px;
  right: 10px;
  background-color: rgba(255,255,255,0.95);
  opacity: 0.6;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 250px;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  z-index: 1000;} 
//* ในส่วน <style> ของคุณ */

/* สำหรับกล่องค้นหาแยก */
.search-container {
    position: relative; /* สำหรับปุ่ม clear และ ul */
}

.search-container #damSearchInput { /* ใช้ ID เพื่อความเฉพาะเจาะจง */
    padding-right: 30px; /* เพิ่ม padding ด้านขวาให้มีที่ว่างสำหรับปุ่ม */
}

.clear-search-btn {
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.5rem;
  color: #888;
  display: none;
  z-index: 10;
}

.clear-search-btn:hover {
    color: #666;
}
.search-input-wrapper {
  position: relative;
}
/* สำหรับ UL ที่เป็นผลการค้นหา */
.search-container ul {
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: white;
    list-style: none;
    padding: 0;
    margin: 0;
}
.search-container ul li {
    padding: 8px 12px;
    cursor: pointer;
}
.search-container ul li:hover {
    background-color: #f0f0f0;
}