/* ===== MAPA DE EVENTOS ===== */

/* Layout em coluna: cabeçalho com altura natural, mapa preenche o resto.
   Nada de calc(100vh - Npx) fixo — a altura real do cabeçalho e da barra
   inferior varia por navegador/aparelho (ex: espaço extra pro home indicator
   do iPhone), então deixar o flexbox descobrir sozinho é o jeito que não
   quebra em nenhum tamanho de tela. */
html, body { height: 100%; }
body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mp-header {
  flex-shrink: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.mp-back {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mp-back:hover { background: var(--surface2); color: var(--green); }

.mp-header-text { display: flex; flex-direction: column; gap: 0.1rem; }
.mp-header-text strong { font-size: 1rem; font-weight: 800; color: var(--text); }
.mp-header-text span { font-size: 0.78rem; color: var(--text-sec); }

.mp-map {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: var(--surface2);
}

/* ---- Pino customizado (verde VOGA) ---- */
.mp-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  background: #22c55e;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  border: 2px solid #fff;
}
.mp-pin svg { transform: rotate(45deg); color: #06210f; }
.mp-pin-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #0f172a;
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transform: rotate(45deg);
}

/* ---- Popup customizado ---- */
.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-close-button { color: var(--text-sec) !important; }

.mp-popup-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.mp-popup-body { padding: 0.85rem 0.9rem 0.95rem; }
.mp-popup-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.4rem;
}
.mp-popup-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mp-popup-meta {
  font-size: 0.76rem;
  color: var(--text-sec);
  margin-bottom: 0.5rem;
}
.mp-popup-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 0.65rem;
}
.mp-popup-btn {
  display: block;
  text-align: center;
  background: var(--green);
  color: #06210f;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.55rem;
  border-radius: 9px;
  text-decoration: none;
}

/* ---- Ajustes finos do Leaflet pro tema VOGA ---- */
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface2) !important; }
.leaflet-container { background: var(--surface2) !important; font-family: inherit !important; }
