/**
 * Modal mapa (Google satélite) para reportes métricas — blur de fondo.
 */
.metric-map-overlay {
  position: fixed;
  inset: 0;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw;
  min-width: 100%;
  height: 100vh;
  min-height: 100%;
  max-height: 100vh;
  margin: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.metric-map-overlay[hidden] {
  display: none !important;
}

body.metric-map-open,
html.metric-map-open {
  overflow: hidden !important;
}

.metric-map-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.metric-map-dialog {
  position: relative;
  z-index: 2;
  width: min(920px, 94vw);
  height: min(72vh, 640px);
  max-height: calc(100vh - 32px);
  background: #121620;
  border: 1px solid #2a3548;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Fuera del recuadro del mapa: esquina superior derecha del viewport */
.metric-map-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2147483647;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(18, 22, 32, 0.95);
  color: #e2e8f4;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.metric-map-close:hover {
  background: rgba(78, 168, 240, 0.25);
  color: #fff;
}

.metric-map-canvas {
  flex: 1;
  width: 100%;
  min-height: 200px;
}

/*
 * Nunca usar display:grid/flex en el <td>: rompe table-layout y genera huecos entre columnas.
 * El bloque coordenadas + icono va dentro de .mtr-loc-inner (inline-flex centrado en la celda).
 */
.mtr-data-table td.mtr-loc-cell {
  display: table-cell !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.mtr-loc-inner {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  margin: 0 auto;
  vertical-align: middle;
}

.mtr-map-loc-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(78, 168, 240, 0.45);
  border-radius: 8px;
  background: rgba(78, 168, 240, 0.12);
  color: #7ec8ff;
  cursor: pointer;
  vertical-align: middle;
}

.mtr-map-loc-btn:hover {
  background: rgba(78, 168, 240, 0.22);
  border-color: #4ea8f0;
  color: #fff;
}

.mtr-map-loc-btn:focus-visible {
  outline: 2px solid #4ea8f0;
  outline-offset: 2px;
}

.mtr-loc-text {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
