/* Overlay ngap lut DEM 3D — tai kem flood_model */

#flood3dProgressModal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 16, 0.78);
  padding: 16px;
  box-sizing: border-box;
}

#flood3dProgressModal[hidden] {
  display: none !important;
}

#flood3dProgressClose {
  background: #2f7fc4;
  color: #fff;
  border: none;
  font-weight: 600;
}

#flood3dProgressClose:disabled {
  opacity: 0.5;
  cursor: wait;
}

#flood3dProgressClose:not(:disabled):hover {
  background: #3d9cf0;
}

.flood3d-progress-bar {
  height: 6px;
  background: rgba(120, 150, 180, 0.22);
  border-radius: 99px;
  overflow: hidden;
  margin: 0 0 8px;
}

.flood3d-progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: #3d9cf0;
  transition: width 0.12s linear;
}

.flood3d-panel {
  position: absolute;
  z-index: 1300;
  right: 14px;
  bottom: 14px;
  width: min(420px, calc(100vw - 28px));
  padding: 10px 12px 12px;
  background: rgba(12, 20, 32, 0.94);
  color: #e8f1fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

body.mode-3d #flood3dPanel {
  z-index: 1300;
}

.flood3d-stats {
  font-size: 12px;
  line-height: 1.45;
  color: #c5d0dc;
  margin: 6px 0 4px;
}

.flood3d-legend {
  position: absolute;
  z-index: 1000;
  left: 60px;
  bottom: 50px;
  padding: 10px 12px;
  background: rgba(12, 28, 48, 0.88);
  color: #f2f6fb;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  min-width: 108px;
}

.flood3d-legend-title {
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.flood3d-legend-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flood3d-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flood3d-legend-swatch {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}
