/* ================================================= */
/*                   Config mapa                     */
/* ================================================= */

#map {
  position: relative;
  width: 100%; height: 85vh;
}

.map_event {
  height: auto;
  min-height: auto;
  width: 200px;

  background-color: white;
  border-radius: 6px;

  margin: auto;
  padding: 8px;

  display: flex;
  flex-direction: column;
}

.map_event img.popup-img {
  display: block;
  width: 100%; height: 130px;

  object-fit: cover;
  object-position: center;

  margin: auto;
  border-radius: 4px;
  background-color: #D9D9D9; 
}

.map_event .popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 10px 0 6px 0;
  text-align: center;
  word-wrap: break-word;
  line-height: 1.25;
}

.map_event button {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #1e293b;

  width: 100%; height: 30px;
  margin-top: 6px;

  cursor: pointer;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s;
}

.map_event button:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
}

.map_event button.add-to-roteiro-map-btn {
  background-color: #2C3E50;
  color: #ffffff;
  border: 1px solid #2C3E50;
}

.map_event button.add-to-roteiro-map-btn:hover {
  background-color: #1f2b38;
}

.leaflet-popup-content{
  margin: 10px !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.18) !important;
}

/* ================================================= */
/*                Aviso zoom inicial                 */
/* ================================================= */

.zoom-hint {
  display: flex;
  align-items: center;
  padding: 10px 20px;

  position: absolute;
  top: 20px; left: 50%;

  font-size: 0.9rem;
  z-index: 1000;
  gap: 8px;
  opacity: 0;

  color: rgb(255, 255, 255);
  background-color: rgba(44, 62, 80, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);

  border-radius: 5px;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

.zoom-hint.show {
  opacity: 1;
}

.zoom-hint i {
  font-size: 1.1rem;
  margin-right: 5px;
}

#center-peruibe-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  position: absolute;
  top: 15px; right: 18px;
  width: 40px; height: 40px;

  border-radius: 50%;
  border: none;

  background: #2C3E50;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);

  font-size: 24px;
  cursor: pointer;
  z-index: 1100;

  transition: background-color 0.3s;
}

#center-peruibe-btn:hover {
  background: #1f2b38;
}

#center-peruibe-btn i {
  font-size: 1.4rem;
}

/* ====================================================== */
/*           Tooltip para o botão de centralizar          */
/* ====================================================== */

.custom-tooltip-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;

  background: #2C3E50;
  border: none;
  border-radius: 50%;

  width: 48px;
  height: 48px;

  cursor: pointer;
  outline: none;
}

.custom-tooltip {
  position: absolute;
  visibility: hidden;
  opacity: 0;

  left: -65%;
  top: -8%;

  width: 100px;
  padding: 6px 10px;

  background-color: #fff;
  color: #222;

  text-align: center;
  font-size: 12px;

  z-index: 1200;

  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid #e0e0e0;
  border-radius: 4px;

  transform: translate(-80%);
  transition: opacity 0.2s;
}

.custom-tooltip-btn:hover .custom-tooltip {
  visibility: visible;
  opacity: 1;
}

/* ================================================= */
/*                  RESPONSIVIDADE                   */
/* ================================================= */

@media (max-width: 600px) {
  #center-peruibe-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  #center-peruibe-btn.show-flex {
    opacity: 1;
  }

  .custom-tooltip {
    left: -60%;
    top: 0%;
    transform: translate(-80%);
  }

  .custom-tooltip-btn:hover .custom-tooltip,
  .custom-tooltip-btn:focus .custom-tooltip {
      visibility: hidden;
      opacity: 0;
  }
}

@media (max-width: 840px) {
  .zoom-hint-mobile { 
    display: block;
    min-width: 200px;
    text-align: center;
  }

  .zoom-hint-desktop { 
    display: none;
  }

  #center-peruibe-btn {
    width: 40px; height: 40px;
  }

  #center-peruibe-btn span i {
    font-size: smaller;
  }
}

@media (min-width: 841px) {
  .zoom-hint-mobile { display: none; }
  .zoom-hint-desktop { display: block; }
}