.sidebar-hero small{
  display:block;
  margin-top:8px;
  color:rgba(255,255,255,.76);
  font-size:9px;
  line-height:1.45;
}
.yg-loading-row{
  padding:12px;
  color:#718078;
  font-size:10px;
}
.search{position:relative;z-index:60}
.yg-search-results{
  position:absolute;
  top:calc(100% + 7px);
  left:0;
  right:0;
  max-height:330px;
  overflow:auto;
  border:1px solid #d7e4de;
  border-radius:11px;
  background:#fff;
  box-shadow:0 14px 30px rgba(20,70,52,.18);
  z-index:3000;
}
.yg-search-result{
  position:static;
  display:flex;
  width:100%;
  height:auto;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid #edf2ef;
  border-radius:0;
  background:#fff;
  color:#26342f;
  text-align:left;
  cursor:pointer;
}
.yg-search-result:hover,.yg-search-result:focus{background:#eaf8fd;outline:none}
.yg-search-result strong{color:#173b2f;font-size:11px;line-height:1.3}
.yg-search-result span{color:#6d7b76;font-size:9px}
.yg-search-empty{padding:13px;color:#a22b2b;font-size:10px}
.stats .stat{cursor:pointer}
.stats .stat:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(20,70,52,.08)}
.popup-body{max-height:min(62vh,520px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.yg-popup-actions{
  position:sticky;
  bottom:0;
  padding:10px 12px 12px;
  border-top:1px solid #e4ece8;
  background:linear-gradient(to bottom,rgba(255,255,255,.92),#fff 24%);
}
.yg-popup-monitoring-link{
  display:flex;
  min-height:38px;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:10px;
  background:#087653;
  color:#fff!important;
  font-size:11px;
  font-weight:850;
  text-decoration:none!important;
  box-shadow:0 5px 14px rgba(8,118,83,.2);
}
.yg-popup-monitoring-link:hover,
.yg-popup-monitoring-link:focus{
  background:#065f43;
  outline:2px solid rgba(8,118,83,.24);
  outline-offset:2px;
}

/* Gallery V2: satu panggung utama dan thumbnail seragam. */
.yg-popup-gallery-v2{
  width:100%;
  padding:10px 12px 14px;
  border-top:1px solid #edf2ef;
  box-sizing:border-box;
}
.yg-popup-gallery-v2__stage{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:16/10;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:12px;
  background:#e8efeb;
  cursor:zoom-in;
}
.yg-popup-gallery-v2__stage img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  background:#16221e;
}
.yg-popup-gallery-v2__count{
  position:absolute;
  right:9px;
  bottom:9px;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(0,0,0,.68);
  color:#fff;
  font-size:9px;
  font-weight:850;
}
.yg-popup-gallery-v2__thumbs{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  width:100%;
  margin-top:7px;
  overflow:visible;
}
.yg-popup-gallery-v2__thumb{
  display:block;
  width:100%;
  aspect-ratio:1/1;
  min-width:0;
  padding:0;
  overflow:hidden;
  border:2px solid transparent;
  border-radius:8px;
  background:#e8efeb;
  cursor:pointer;
}
.yg-popup-gallery-v2__thumb.is-active{
  border-color:#087653;
  box-shadow:0 0 0 1px rgba(8,118,83,.18);
}
.yg-popup-gallery-v2__thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.yg-popup-gallery-v2__empty{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  padding:18px;
  color:#52665e;
  text-align:center;
  font-size:10px;
  font-weight:750;
}
.yg-gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:1000000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(3,12,9,.94);
}
.yg-gallery-lightbox.is-open{display:flex}
.yg-gallery-lightbox__viewport{
  width:calc(100vw - 100px);
  height:calc(100dvh - 90px);
  max-height:calc(100vh - 90px);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x pan-y pinch-zoom;
  scrollbar-gutter:stable;
  outline:none;
}
.yg-gallery-lightbox__image{
  display:block;
  width:auto;
  height:auto;
  min-width:100%;
  min-height:100%;
  margin:auto;
  object-fit:contain;
}
.yg-gallery-lightbox__close,
.yg-gallery-lightbox__nav{
  position:absolute;
  z-index:2;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#143c30;
  cursor:pointer;
  box-shadow:0 5px 20px rgba(0,0,0,.3);
}
.yg-gallery-lightbox__close{top:14px;right:14px;width:44px;height:44px;font-size:28px}
.yg-gallery-lightbox__nav{top:50%;width:46px;height:46px;transform:translateY(-50%);font-size:32px}
.yg-gallery-lightbox__prev{left:16px}.yg-gallery-lightbox__next{right:16px}
.yg-gallery-lightbox__counter{
  position:absolute;
  bottom:16px;
  left:50%;
  transform:translateX(-50%);
  padding:6px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#143c30;
  font-size:11px;
  font-weight:800;
}
body.yg-gallery-lightbox-open{overflow:hidden}

/* WebGIS tidak memakai header global: gunakan seluruh tinggi viewport. */
body.webgis-page .app-shell{
  inset:0;
}

@media(max-width:760px){
  body.webgis-page .sidebar{
    top:0;
  }

  body.webgis-page .overlay{
    inset:0;
  }

  .popup-body{
    max-height:min(58vh,470px);
  }

  .yg-popup-gallery-v2{padding:9px 10px 12px}
  .yg-popup-gallery-v2__stage{aspect-ratio:4/3}
  .yg-popup-gallery-v2__thumbs{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .yg-gallery-lightbox{padding:0}
  .yg-gallery-lightbox__viewport{
    width:100vw;
    height:100dvh;
    max-height:100vh;
    padding:max(58px,env(safe-area-inset-top)) 0 max(50px,env(safe-area-inset-bottom));
    box-sizing:border-box;
    overflow:auto;
    touch-action:pan-x pan-y pinch-zoom;
  }
  .yg-gallery-lightbox__image{
    min-width:100%;
    min-height:calc(100dvh - 108px);
  }
  .yg-gallery-lightbox__nav{width:40px;height:40px;font-size:28px}
  .yg-gallery-lightbox__prev{left:8px}.yg-gallery-lightbox__next{right:8px}
}
.yg-monitoring-popup .leaflet-popup-content{
  width:min(280px,calc(100vw - 48px))!important;
}
.yg-monitoring-popup .popup-body{
  max-height:min(52vh,380px);
  padding-bottom:12px;
}
.yg-monitoring-popup .yg-monitoring-has-gallery>.popup-body{
  max-height:min(30vh,220px);
}
.yg-monitoring-popup .yg-popup-actions{
  position:static;
  margin-top:10px;
}
.yg-monitoring-popup .yg-popup-gallery-v2__stage{
  aspect-ratio:16/9;
}
.yg-point-hit-marker {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.yg-point-dot {
  align-items: center;
  background: var(--yg-point-color, #078b78);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(16, 42, 36, 0.35);
  display: inline-flex;
  height: var(--yg-point-size, 14px);
  justify-content: center;
  pointer-events: none;
  width: var(--yg-point-size, 14px);
}

.yg-point-dot__symbol {
  color: #fff;
  font-size: max(8px, calc(var(--yg-point-size, 14px) * 0.52));
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  transform: translateY(-0.2px);
}

.yg-point-hit-marker:hover .yg-point-dot,
.yg-point-hit-marker:focus .yg-point-dot {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7),
    0 2px 7px rgba(16, 42, 36, 0.45);
  transform: scale(1.12);
}
.yg-ps-document-legend{display:grid;gap:5px;max-width:220px;padding:11px 13px;border:1px solid #dce9e5;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 5px 18px rgba(9,53,56,.14);color:#24454b;font:11px/1.35 Inter,"Segoe UI",sans-serif;backdrop-filter:blur(8px)}
.yg-ps-document-legend strong{margin-bottom:2px;color:#0a2d33;font-size:12px}
.yg-ps-document-legend span{display:flex;align-items:center;gap:8px}
.yg-ps-document-legend i{display:inline-block;width:20px;height:9px;border:2px solid var(--yg-ps-color);border-radius:3px;background:var(--yg-ps-color)}
