/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Prompt', sans-serif;
    background-color: #FEFEFE;
    color: #333;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
  }
  
  p, ul, li {
    font-weight: 400;
  }
  
  /* Header */
  .header {
    background: linear-gradient(to left, #1DA2EA, #F8FCFF);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* แยกโลโก้และปุ่มออกจากกัน */
  }
  
  .logo img {
    height: 50px;
  }

  /* โลโก้และปุ่มอยู่ในกลุ่มเดียวกัน */
.logo-nav {
  display: flex;
  align-items: center;
  gap: 20px; /* ระยะห่างระหว่างโลโก้กับปุ่ม */
}

.logo {
  height: 50px;
}

/* Navigation Buttons */
.nav-buttons {
  display: flex;
  gap: 15px; /* ระยะห่างระหว่างปุ่ม */
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px; /* ระยะห่างระหว่างไอคอนกับข้อความ */
  background-color: #F0F9FF;
  color: #007BFF;
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, transform 0.2s ease;
}

.nav-btn:hover {
  background-color: #E0F2FF;
  transform: translateY(-2px);
}

.nav-btn i {
  font-size: 18px; /* ขนาดไอคอน */
}
  
  /* Dashboard */
  .dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* ทำให้การ์ดยืดหยุ่น */
    gap: 20px;
    margin: 20px;
  }
  
  
  .card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  .card.active {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.5);
}

  
  .card:hover {
    transform: translateY(-5px);
  }
  
  .card .highlight {
    font-size: 3em;
    color: #0370BD;
  }
  
  .highlight{
    font-weight: bolder;
  }
  .highlight2{
    font-size: 3em;
    font-weight: bolder;
    color: #00BF63;
  }
  .sub-hl{
    color: #0370BD;
  }
  .sub-hl2{
    color: #00BF63;
  }
  
  .card.active {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.5);
  }
  
  .card .highlight.green {
    color: #28a745;
  }
  
  /* Map Section */
  .map-section {
    display: flex;
    gap: 20px;
    margin: 20px;
  }
  
  .map-container {
    flex: 1;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
  }
  
 /* Placeholder Section */
.placeholder {
    flex: 1;
    height: 600px; /* เท่ากับแผนที่ */
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* จัดเรียงแนวตั้ง */
    padding: 20px;
    text-align: center;
  }

  .placeholder h2 {
    margin-bottom: 10px; /* เว้นช่องว่าง */
  }
  
  .placeholder .content {
    flex: 0 0 auto; /* ข้อความไม่ถูกยืด */
  }

  .text-content {
    font-weight: lighter;
  }
  .placeholder .chart-container {
    flex: 1; /* Chart ขยายได้ */
    position: relative;
    width: 100%;
    height: 400;
  }

  .data-row {
    display: grid;
    grid-template-columns: 1fr auto; /* กำหนด 2 คอลัมน์: label และ value */
    align-items: center; /* จัดให้อยู่กึ่งกลางแนวตั้ง */
    margin: 5px 0; /* ช่องว่างระหว่างแต่ละแถว */
    font-size: 16px;
    color: #333;
  }
  
  .data-row .data-label {
    text-align: left;
    font-weight: 600;
  }
  
  .data-row .data-value {
    text-align: right;
    font-weight: 600;
    color: #007bff;
  }
  
  

  #map {
    width: 100%;
    height: 100%;
  }
  
canvas {
  margin-top: 12px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 90% !important;
}

.marker-active {
    transform: scale(1.2); /* ขยายขนาด 20% */
    transition: transform 0.3s ease-in-out;
  }

  #filter-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  /* แถบควบคุมบนแผนที่ */
  .leaflet-control-custom {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 10px;
    font-family: 'Prompt', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
  }

  .filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }

  .search-box {
    width: 180px;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: 1px solid #007bff;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Prompt', sans-serif;
  }

  .search-box::placeholder {
    color: #007bff;
    opacity: 0.7;
  }

  .search-box:focus {
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 91, 187, 0.5);
  }

  .filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
  }

  .filter-checkbox input {
    margin-right: 10px;
    accent-color: #007bff;
  }

  /* ปรับแต่ง Popup ขนาดใหญ่สำหรับ WMA */
.leaflet-popup-content-wrapper.large-popup {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 15px;
}

.leaflet-popup-content.large-popup {
  margin: 0;
  font-family: 'Prompt', sans-serif;
}

/* เนื้อหา Popup */
.custom-popup h2 {
  margin-top: 0;
  font-size: 20px;
  color: #0370BD;
  text-align: center;
}

.custom-popup p {
  font-size: 16px;
  color: #333;
  margin-top: 10px;
  text-align: justify;
}

/* รูปภาพใน Popup */
.popup-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ปรับแต่งลูกศรของ Popup */
.leaflet-popup-tip {
  background: #fff;
}
