#sucursalesMapContainer {
  position: relative;
  width: 100%;
}

#sucursalesMap {
  min-height: 600px;
  width: 100%;
  border: 1px solid grey;
  position: relative;
}

.map-loading-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: "Poppins", Sans-serif;
  font-size: 16px;
  color: #030b84;
  font-weight: 500;
}

.map-loading-placeholder::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ff0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Loading placeholder will be hidden via JavaScript when map is ready */

#sucursalesMapSearch {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  width: calc(100% - 30px);
  max-width: 400px;
}

#sucursalesSearchInput {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: "Poppins", Sans-serif;
  border: 2px solid #030b84;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#sucursalesSearchInput:focus {
  border-color: #ff0000;
  box-shadow: 0 2px 12px rgba(255, 0, 0, 0.2);
}

#sucursalesSearchInput::placeholder {
  color: #999;
}

/* Style for Places Autocomplete dropdown */
.pac-container {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid #030b84;
  border-top: none;
  margin-top: -2px;
  font-family: "Poppins", Sans-serif;
}

.pac-item {
  padding: 10px 16px;
  cursor: pointer;
  border-top: 1px solid #e0e0e0;
}

.pac-item:first-child {
  border-top: none;
}

.pac-item:hover,
.pac-item-selected {
  background-color: #f5f5f5;
}

.pac-item-query {
  font-size: 15px;
  color: #333;
}

.pac-icon {
  margin-right: 10px;
}

.marker-wrapper {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50vw;
  background: #ff0000;
  position: relative;
}

.marker-wrapper::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #ff0000;
  border-radius: 50vw;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.marker-wrapper:hover::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50vw;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 2s infinite;
  outline: 1px solid #ff0000;
  background: transparent;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 1;
  }

  95% {
    /*transform: translate(-50%, -50%) scale(1.2);*/
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

.custom-marker-label img {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.custom-marker-label:hover img {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px rgba(3, 11, 132, 0.6));
}

/* InfoWindow container */
.info-window {
  font-family: "Poppins", Sans-serif;
  padding: 10px 15px;
  max-width: 240px;
}

/* Title */
.info-window h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #030b84;
}

/* Text */
.info-window {
  font-size: 16px;
  line-height: 1.4;
}

.info-window p {
  margin: 4px 0;
  font-size: .88rem;
  color: #333;
  line-height: 1.4;
  font-weight: 500;
}

.info-window p strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: .5;
  margin-top: .5rem;
}

.info-window a {
  padding: .5em 1em;
  background: #ff0000;
  color: white;
  display: flex;
  align-items: center;
  gap: .5em;
  border-radius: 20px;
  justify-content: center;
  text-align: center;
  border: 1px solid #ff0000;
  font-weight: 600;

  transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;

  text-decoration: none;
  margin-top: 1rem;

  overflow: hidden;

  text-transform: uppercase;
  font-size: 14px;
}

.info-window a:hover svg {
  animation: icon-move 0.5s forwards;
}

@keyframes icon-move {

  /* Start at normal spot */
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }

  /* Move to upper (exit) */
  40% {
    transform: translate(0, -100%);
    opacity: 0;
  }

  /* Reappear from bottom */
  41% {
    transform: translate(0, 100%);
    opacity: 0;
  }

  /* Return to original place */
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
}

/*
       .info-window a:hover{
          background: white;
          color: #ff0000;
          border: 1px solid #ff0000;
          transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
       }

       .info-window a:hover svg path{
          stroke: #ff0000;
       }
       */
/* Optional: add border or rounded box style */
.gm-style .gm-style-iw {
  border-radius: 10px !important;
  padding: 0 !important;
}

.gm-style .gm-style-iw,
.gm-style-iw-d {
  overflow: hidden !important;
}

/* Remove close button outline */
.gm-ui-hover-effect {
  opacity: 0.8;
}

.gm-ui-hover-effect:hover {
  opacity: 1;
}

/* Hide the InfoWindow close button */
.gm-style-iw-chr,
.gm-ui-hover-effect {
  display: none !important;
}

.info-window {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;

  overflow: hidden;
}

.info-window.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.info-window.animate-out {
  opacity: 0;
  transform: translateY(10px);
}