/* UI de selección de ubicación sobre el mapa público (solo visible con modal de reporte abierto) */

.reporte-map-picker-root {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem 0.35rem;
  pointer-events: none;
  box-sizing: border-box;
}

.reporte-map-picker-root .reporte-map-picker__banner,
.reporte-map-picker-root .reporte-map-picker__actions,
.reporte-map-picker-root button {
  pointer-events: auto;
}

.reporte-map-picker__banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md, 0.5rem);
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow:
    0 2px 12px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.reporte-map-picker__banner--hint {
  background: linear-gradient(180deg, rgba(254, 252, 232, 0.97), rgba(253, 230, 138, 0.35));
  border: 1px solid rgba(202, 138, 4, 0.45);
  color: #713f12;
}

.reporte-map-picker__banner--success {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.98), rgba(167, 243, 208, 0.45));
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #065f46;
}

.reporte-map-picker__banner-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: rgba(202, 138, 4, 0.25);
  border: 1px solid rgba(180, 83, 9, 0.35);
  position: relative;
}

.reporte-map-picker__banner-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.35rem;
  height: 0.35rem;
  margin: -0.2rem 0 0 -0.175rem;
  border-radius: 50%;
  background: #b45309;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.reporte-map-picker__banner-icon--ok {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(5, 150, 105, 0.4);
}

.reporte-map-picker__banner-icon--ok::after {
  content: "";
  width: 0.45rem;
  height: 0.25rem;
  margin: -0.2rem 0 0 -0.25rem;
  border-radius: 0;
  background: transparent;
  border: solid #047857;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  box-shadow: none;
}

.reporte-map-picker__banner-text {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.reporte-map-picker__banner-text strong {
  font-weight: 700;
}

@media (max-width: 639px) {
  .reporte-map-picker-root {
    padding: 0.35rem 0.35rem 0.25rem;
    gap: 0.3rem;
  }

  /* Elegir punto: mensaje abajo para no tapar el centro del mapa */
  .reporte-map-picker-root--picking {
    justify-content: flex-end;
    top: auto;
    bottom: 0;
    padding-top: 1.25rem;
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent 0%, rgba(254, 252, 232, 0.88) 35%, rgba(254, 252, 232, 0.97) 100%);
  }

  .reporte-map-picker__banner {
    font-size: 0.78rem;
    padding: 0.45rem 0.55rem;
  }

  .reporte-map-picker__actions {
    justify-content: stretch;
  }

  .reporte-map-picker__btn {
    flex: 1 1 auto;
    min-width: min(100%, 7.5rem);
    justify-content: center;
    text-align: center;
  }

  /* Punto marcado: deja solo mapa limpio, sin CTAs sobre Leaflet */
  .reporte-map-picker-root--selected {
    top: 0;
    bottom: auto;
    padding-top: 0.35rem;
    padding-bottom: 0.25rem;
    background: transparent;
  }
}

/* Estado del mapa: modo elegir ubicación (refuerzo junto a mapa-wrapper--report-pick) */
body.reporte-modal-map-active.reporte-map-location-pending .mapa-wrapper--report-pick {
  outline-color: rgba(202, 138, 4, 0.55);
}

body.reporte-modal-map-active.reporte-map-location-ready .mapa-wrapper--report-pick {
  outline-color: rgba(16, 185, 129, 0.45);
}

/* Escritorio: la confirmación de ubicación queda en el panel lateral; no duplicar banner alto en el mapa */
@media (min-width: 640px) {
  /* En escritorio también evitamos CTAs sobre el mapa */
  .reporte-map-picker-root--selected {
    background: transparent;
  }
}
