:root {
  --brand: #0b486b;
  --muted: #6b7280;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--brand);
  color: white;
  padding: 12px 16px;
}
.navbar-collapse {
  flex-grow: 0 !important;
}
#navbarContent {
  max-width: 280px;
}
.title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

#searchWrap {
  position: relative;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
}
#searchInput {
  width: 100%;
  border-radius: 10px;
  border: 0;
  padding: 10px 12px;
  outline: none;
}
#suggest {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  overflow: hidden;
}
#suggest div {
  padding: 10px 12px;
  cursor: pointer;
}
#suggest div:hover {
  background: #f3f4f6;
}
#map {
  height: calc(100vh - 64px);
}
.filter-box {
  position: absolute;
  top: 90px;
  right: 16px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  width: 260px;
  z-index: 800;
}
.filter-title {
  font-weight: 800;
  margin-bottom: 6px;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(64%);
  transition: transform 0.25s ease;
  z-index: 900;
}
.bottom-sheet.open {
  transform: translateY(0%);
}
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}
.grabber {
  width: 60px;
  height: 5px;
  background: #d1d5db;
  border-radius: 4px;
  margin: 6px auto;
}
.sheet-title {
  font-weight: 800;
  margin: 0;
}
.toggle-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
}
.list-wrap {
  padding: 6px 12px 14px;
  overflow-x: auto;
  white-space: nowrap;
}
.card-item {
  cursor: pointer;
  display: inline-block;
  width: 230px;
  margin-right: 12px;
  vertical-align: top;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.card-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.card-body {
  padding: 8px 10px;
}
.card-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 6px;
}
.card-meta {
  color: #6b7280;
  font-size: 12px;
}

/* vùng hiển thị trong modal */
#detailModalBody {
  min-height: 200px;
  background: #fff;
}
/* style cơ bản cho docx-preview */
.docx {
  color: #222;
  line-height: 1.4;
}
.docx p {
  margin: 0 0 8px;
}
.docx table {
  border-collapse: collapse;
}
.docx td,
.docx th {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
}
.docx img {
  max-width: 100%;
  height: auto;
}
/* Khi hiển thị nhiều trang, docx-preview sẽ bọc wrapper, đảm bảo cuộn tốt trong modal */
.docx-wrapper {
  overflow: hidden;
}

#detailModal .modal-header {
  position: relative;
}
#detailModal .modal-header .btn-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: var(
    --bs-modal-header-padding-x
  ); /* cách lề phải = padding header (mặc định 1rem) */
}

.ward-outline {
  /* bóng mềm phía dưới */
  filter: drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.28)) /* bóng gần */
    drop-shadow(0px 8px 14px rgba(0, 0, 0, 0.22)); /* bóng xa */
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: filter 0.28s ease, stroke-width 0.28s ease;
}

/* Khi hover hoặc focus: nổi rõ, nhìn thành "khối" hơn */
.ward-outline:hover {
  filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.35))
    drop-shadow(0px 12px 18px rgba(0, 0, 0, 0.28));
  stroke-width: 2.8px; /* viền hơi dày tí tạo cảm giác nhô lên */
}

#map .custom-map-label {
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: #555555;
  font-size: 12px;
  font-weight: lighter;
}
#map .custom-map-label__ward {
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: blue; 
  font-size: 14px;
  font-weight: bold; 
}

@media (max-width: 768px) {
  #navbarContent {
    max-width: 100%;
  }

  .leaflet-tooltip.custom-map-label {
    font-size: 16px !important;
  }

  .leaflet-tooltip.custom-map-label__ward {
    font-size: 18px !important;
  }

  .filter-box{
    top: 120px;
  }
}
