/* Painel desktop (drawer direito) */
.mc-painel-mapa {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  overflow-y: auto;
  padding: 16px 20px 24px;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  animation: mc-slide-in-right 0.18s ease-out;
}
@keyframes mc-slide-in-right {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.mc-painel-mapa .mc-fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.mc-painel-mapa .mc-fechar:hover {
  background: #f0f0f0;
  color: #000;
}
.mc-painel-mapa h3 {
  margin: 8px 0 4px;
  font-size: 18px;
  padding-right: 32px;
}
.mc-painel-mapa .mc-preco {
  font-size: 20px;
  font-weight: 700;
  color: #ff6600;
}
.mc-painel-mapa .mc-meta {
  color: #555;
  font-size: 13px;
  margin: 4px 0 12px;
}

.mc-painel-mapa .mc-foto-carrossel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  margin-bottom: 12px;
}
.mc-painel-mapa .mc-foto-carrossel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Lightbox: foto ampliada centralizada */
.mc-foto-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: mc-lightbox-fade 0.15s ease-out;
}
@keyframes mc-lightbox-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.mc-foto-lightbox img {
  max-width: min(85vw, 1100px);
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  background: #222;
  display: block;
}
.mc-foto-lightbox .mc-lb-fechar {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1;
}
.mc-foto-lightbox .mc-lb-fechar:hover {
  background: #fff;
  transform: scale(1.05);
}
.mc-foto-lightbox .mc-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.mc-foto-lightbox .mc-lb-nav:hover {
  background: #fff;
}
.mc-foto-lightbox .mc-lb-nav.prev {
  left: 16px;
}
.mc-foto-lightbox .mc-lb-nav.next {
  right: 16px;
}
.mc-foto-lightbox .mc-lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
}
@media (max-width: 768px) {
  .mc-foto-lightbox img {
    max-width: 95vw;
    max-height: 80vh;
  }
  .mc-foto-lightbox .mc-lb-nav {
    width: 38px;
    height: 38px;
  }
}
.mc-painel-mapa .mc-foto-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 50%;
  line-height: 30px;
  text-align: center;
}
.mc-painel-mapa .mc-foto-nav.prev {
  left: 8px;
}
.mc-painel-mapa .mc-foto-nav.next {
  right: 8px;
}

.mc-painel-mapa .mc-secao {
  border-top: 1px solid #eee;
  padding: 10px 0;
  font-size: 13px;
}
.mc-painel-mapa .mc-secao strong {
  display: block;
  margin-bottom: 6px;
  color: #333;
}

.mc-painel-mapa table.mc-unidades {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}
.mc-painel-mapa table.mc-unidades th {
  background: #fafafa;
  text-align: left;
  padding: 6px;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
  color: #555;
}
.mc-painel-mapa table.mc-unidades td {
  padding: 6px;
  border-bottom: 1px solid #f3f3f3;
}

.mc-painel-mapa .mc-acoes button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fafafa;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}
.mc-painel-mapa .mc-acoes button:hover {
  background: #f0f0f0;
}
.mc-painel-mapa .mc-acoes button.primario {
  background: #ff6600;
  color: #fff;
  border-color: #ff6600;
}
.mc-painel-mapa .mc-acoes button.primario:hover {
  background: #e65500;
}

/* Bottom sheet mobile */
@media (max-width: 768px) {
  .mc-painel-mapa {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 45vh;
    border-radius: 16px 16px 0 0;
    animation: mc-slide-in-bottom 0.22s ease-out;
    transition: height 0.2s ease-out;
  }
  .mc-painel-mapa.mc-sheet-full {
    height: 95vh;
  }
  .mc-painel-mapa.mc-sheet-peek {
    height: 80px;
    overflow: hidden;
    padding: 12px 16px;
  }
  .mc-painel-mapa::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 0 auto 8px;
  }
}
@keyframes mc-slide-in-bottom {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Botao "Perto de mim" */
.mc-fab-perto {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 20px;
}

/* Botao olho (esconder/mostrar precos nos pinos) */
.mc-fab-olho {
  position: absolute;
  bottom: 80px;
  right: 24px;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mc-fab-olho[data-escondido="1"] {
  background: #ff6600;
  color: #fff;
}

/* Toggle heatmap */
.mc-toggle-heat {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.mc-toggle-heat[data-ativo="1"] {
  background: #ff6600;
  color: #fff;
  border-color: #ff6600;
}

/* Aviso de empreendimentos sem coords */
.mc-sem-coords {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  z-index: 5;
  max-width: 300px;
}
.mc-sem-coords summary {
  cursor: pointer;
  color: #0066cc;
}
