/* Onde Tem Blitz V2/public/css/style.css — Mobile First */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  overflow-x: hidden;
  background: #1a1a2e;
}

/* ── Mapa ── */
#map-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 56px);
  margin-top: 56px;
}

#map {
  height: 100%;
  width: 100%;
}

/* ── Botão Atualizar ── */
#atualizarMapa {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

#atualizarMapa:hover {
  background-color: #0056b3;
}

#atualizarMapa:active {
  transform: scale(0.96);
}

/* ── Em telas maiores o botão fica afastado do canto ── */
@media (min-width: 768px) {
  #atualizarMapa {
    top: 12px;
    left: 200px;
  }
}

/* ── Navbar busca mobile ── */
#buscaEndereco::placeholder {
  font-size: 13px;
}

@media (max-width: 767px) {
  #buscaEndereco {
    font-size: 13px;
  }

  .navbar-collapse .d-flex {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }
}

/* ── InfoWindow do Google Maps — Premium Look ── */
.gm-style .gm-style-iw-c {
  border-radius: 16px !important;
  padding: 0 !important;
  max-width: 300px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
  background-color: #1e1e2d !important;
  color: #ffffff !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  padding: 12px 16px !important;
}

/* Overrides de cores para contraste no fundo escuro do InfoWindow */
.gm-style .gm-style-iw-d .text-muted {
  color: #b0b0c0 !important;
}

.gm-style .gm-style-iw-d .text-secondary {
  color: #d0d0e0 !important;
}

.gm-style .gm-style-iw-d .text-primary {
  color: #4dabf7 !important;
}

.gm-style .gm-style-iw-d h5,
.gm-style .gm-style-iw-d h6 {
  color: #ffffff !important;
}

.gm-style .gm-style-iw-d .border-top,
.gm-style .gm-style-iw-d .border-bottom {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.gm-style .gm-style-iw-t::after {
  background: #1e1e2d !important;
  box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Botão de fechar do InfoWindow — Estilo Premium Reduzido */
.gm-ui-hover-effect {
  width: 26px !important;
  height: 26px !important;
  top: 6px !important;
  right: 6px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 50% !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
}

.gm-ui-hover-effect:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

.gm-ui-hover-effect > span {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  background-color: #ffffff !important;
}

/* ── Utilitários ── */
.legend {
  background-color: rgba(33, 33, 33, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-size: 11px;
  backdrop-filter: blur(6px);
  position: absolute;
  bottom: 125px !important; /* Altura aumentada para limpar o botão de reporte */
  right: 16px !important;
  z-index: 1001 !important;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 575px) {
  .legend {
    bottom: 95px !important; /* No mobile o botão costuma ser menor ou ter outro espaço */
    right: 12px !important;
    padding: 8px 10px;
  }
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

#popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 10px;
  text-align: center;
  z-index: 9999;
  width: 90%;
  max-width: 360px;
}

#close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 20px;
  cursor: pointer;
}

/* ── Toast Notifications Premium ── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  /* Deixa clicar através do container principal */
}

.otb-toast {
  min-width: 250px;
  max-width: 350px;
  background-color: #2c2c3e;
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  pointer-events: auto;
  /* Permite interagir com o toast em si */
  border-left: 5px solid transparent;
}

.otb-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.otb-toast.toast-success {
  border-left-color: #28a745;
}

.otb-toast.toast-error {
  border-left-color: #dc3545;
}

.otb-toast.toast-info {
  border-left-color: #17a2b8;
}

.otb-toast.toast-warning {
  border-left-color: #ffc107;
}

.otb-toast-icon {
  font-size: 18px;
  padding-top: 2px;
}

.otb-toast-content {
  flex-grow: 1;
}

/* Modal Customizado (Substitui o window.confirm nativo duro) */
#custom-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

#custom-confirm-overlay.show {
  opacity: 1;
  visibility: visible;
}

.custom-confirm-box {
  background: #252533;
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#custom-confirm-overlay.show .custom-confirm-box {
  transform: scale(1);
}

.custom-confirm-titulo {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.custom-confirm-opcoes {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.custom-confirm-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-confirm-yes {
  background: #dc3545;
  color: #fff;
}

.btn-confirm-yes:hover {
  background: #c82333;
}

.btn-confirm-no {
  background: #495057;
  color: #fff;
}

.btn-confirm-no:hover {
  background: #343a40;
}

/* --- Pulse Effect for Player Location --- */
.pulse-container {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
}

.pulse {
  width: 14px;
  height: 14px;
  background-color: #bbff00;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(154, 248, 1, 0.87);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(154, 248, 1, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 60px rgba(154, 248, 1, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(154, 248, 1, 0);
  }
}