body,html{
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; 
}
.container-fluid{
    position: relative;
    height: 100vh;
    width: 100vw;
}
#map {
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    position:absolute;
    z-index: 1;
}
/*danhsach tỉnh huyện*/
.sidebar{
    position: absolute;
    top: 10px;
    left: 10px;
    width: auto;
    background: transparent;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/*MỚI taynguyen*/
.taynguyen-item{
    cursor: pointer;
    background-color: #007bff;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    text-align: left;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.3s;
    z-index: 1000;
}
.taynguyen-item:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}
/* tinh*/
.tinh-list {
    display: none;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #007bff;
    transition: max-height 0.3s ease-in-out;
}
.tinh-item {
    background-color: #007bff;
    color: white;
    padding: 8px;
    border-radius: 3px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: background-color 0.3s;
}
.tinh-item:hover {
    background-color: #0056b3;
}
/*huyện*/
.huyen-item{
    background-color: #648ce2;
    color: white;
    padding: 8px;
    border-radius: 3px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: background-color 0.3s;
}
.huyen-item:hover{
    background-color: #4777e14c;
}
.huyen-list{
    display: none;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #f0f0ee;
    transition: max-height 0.3s ease-in-out;
    
}
.huyen-item.bi{
    font-size:large;
    color: black;
}
.huyen-item.selected.bi{
    color: green;
}
/*nút thoát thông báo*/
.thongtin{
    color: red;
}

/* PHẦN HIỂN THỊ THANH THÔNG BÁO*/

/* =========================
   PHẦN HIỂN THỊ SOIL PANEL
   - CHỈ 1 THANH CUỘN DUY NHẤT: .soil-panel
   ========================= */

.soil-panel {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(100%);
  width: min(420px, calc(100% - 32px));

  background: #c8e0f8;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  padding: 8px 8px 8px;
  padding-top:5px ;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;

  /* ✅ 1 thanh cuộn lớn duy nhất */
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;

  z-index: 10;
  transition: transform 0.5s ease;
}

/* (Tuỳ chọn) Ẩn thanh cuộn nhưng vẫn cuộn được */
/*
.soil-panel { scrollbar-width: none; -ms-overflow-style: none; }
.soil-panel::-webkit-scrollbar { display: none; }
*/

.soil-panel.hidden {
  display: none;
}

/* Hiệu ứng lên/xuống */
#soil-panel.panel-open {
  transform: translate(-50%, 0);
}
#soil-panel.panel-closed {
  transform: translate(-50%, 100%);
}

/* Thanh kéo nhỏ */
.panel-handle {
  width: 50px;
  height: 4px;
  border-radius: 999px;
  background: #ddd;
  margin: 0 auto 12px;
}

/* Nút đóng */
.panel-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  font-size: 16px;
  line-height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
}
.panel-close:hover {
  background: rgba(0,0,0,0.12);
}

/* Title */
.panel-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.panel-subtitle {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 8px;
}

/* Section box */
.panel-section {
  background: #f7f7f9;
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  gap: 8px;

  /* ✅ KHÔNG cuộn con */
  overflow: visible;
}

/* ========== KHỐI THUỘC TÍNH ĐẤT ========== */
.panel-soil {
  /* ✅ KHÔNG tạo thanh cuộn con nữa */
  max-height: none !important;
  overflow: visible !important;
}

.panel-soil .soil-left { flex: 1.2; }
.panel-soil .soil-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.panel-soil img {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
}

.panel-section table,
.panel-soil table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border-bottom: none;
}

.panel-soil tr {
  border-bottom: 1px solid #e5e7eb;    /* kẻ ngang từng dòng */
}

.panel-section td:first-child,
.panel-soil td:first-child {
  color:black;
  padding-right: 6px;
}
.panel-section td:last-child,
.panel-soil td:last-child {
  font-weight: 500;
}

/* ✅ .panel-scroll KHÔNG còn scroll – cuộn chung bằng .soil-panel */
.panel-scroll {
  margin-top: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

/* Bảng chung */
.panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}
.panel-table th,
.panel-table td {
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
}
.panel-table th {
  text-align: left;
  font-size: 12px;
  color: #222;        /* đổi lại cho dễ đọc */
  font-weight: 600;
}

/* Ghi chú */
.panel-note {
  margin: 4px 0 4px;
  font-size: 0.85rem;
  font-style: italic;
  color: #333;
}

/* ========== BẢNG BÓN PHÂN ========== */
.panel-table-caphekinhdoanh {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff !important;
  border-bottom: 1px solid #f8a2a2;
  border-radius: 12px;
  overflow: hidden;
}

.panel-table-caphekinhdoanh th,
.panel-table-caphekinhdoanh td {
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
}

.crop-header th {
  color: #007bff;
  font-weight: 700;
  background: #f3f8ff;
}

/* Fertilizer block */
.panel-fertilizer {
  display: flex;
  gap: 10px;
  align-items: center;
}
.fert-chart-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #eee, #ccc);
}
.fert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}
.fert-list li { margin-bottom: 4px; }

/* PHẦN HIỆU ỨNG HIỆN THÔNG TIN */



#soil-panel.panel-open {
  transform: translate(-50%, 0);
}


#soil-panel.panel-closed {
  transform: translate(-50%, 100%);
}


/* phần css cho bảng bón phân*/


.panel-table-caphekinhdoanh{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff !important;   /* nền trắng */
  border-bottom: 1px solid #f8a2a2;   /* đường kẻ ngang */
}

.crop-header{
  color: #007bff;
}

/* Thanh cuộn chính của soil-panel */
.soil-panel::-webkit-scrollbar {
  width: 8px;                 /* độ dày thanh cuộn */
}

.soil-panel::-webkit-scrollbar-track {
  background: transparent;    /* nền trong */
  border-radius: 999px;
}

.soil-panel::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.25);  /* màu thanh kéo */
  border-radius: 999px;          /* BO GÓC TRÒN */
}

.soil-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.4);
}


/*cố dịnh nút thoát*/
.panel-close{
  position: sticky;     /* 🔑 CHÌA KHÓA */
  top: 2px;             /* cách mép trên panel */
  margin-left: auto;    /* đẩy sang phải */
  
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);

  font-size: 16px;
  line-height: 28px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 20;          /* nổi trên nội dung */
}

.panel-close:hover{
  background: rgba(0,0,0,0.15);
}


/* PHẦN CHỌN LOP BAN DO*/

/* Menu đổi nền bản đồ (mở ra bên trái cụm nút) */
.gm-layer-menu{
  position:absolute;
  right:54px;
  top:0;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  padding:6px;
  min-width:190px;
  z-index:50;
}
.gm-layer-menu button{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  padding:9px 10px;
  border-radius:10px;
  font-size:14px;
  cursor:pointer;
}
.gm-layer-menu button:hover{ background:#f3f5f8; }
.gm-layer-menu .active{ background:#eaf2ff; font-weight:600; }




/* phần bảng thuộc tính */

#Dien_tich:not(:empty)::after {
  content: " ha";
}

