@import url("main.css");

/*--------------------------------------------------------------
# Puntos de Venta Layout
--------------------------------------------------------------*/
.puntos-venta-section {
  padding: 40px 0 60px 0;
  background-color: #f8f9fa;
  overflow: visible !important;
}

/*--------------------------------------------------------------
# Sidebar de Ubicaciones
--------------------------------------------------------------*/
.locations-sidebar {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.locations-header {
  padding: 20px;
  background-color: var(--color-primary);
  color: #fff;
}

.locations-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.locations-search {
  padding: 15px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.locations-search .input-group {
  border-radius: 20px;
  border: 1px solid #dee2e6;
  background: #fff;
  transition: all 0.2s ease;
  overflow: hidden;
}

.locations-search .input-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 76, 146, 0.25);
}

.locations-search .input-group-text {
  background-color: transparent !important;
  border: none !important;
  padding-left: 15px;
}

.locations-search input {
  border: none !important;
  box-shadow: none !important;
  padding: 8px 15px 8px 5px !important;
}

.locations-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.locations-list::-webkit-scrollbar {
  width: 6px;
}
.locations-list::-webkit-scrollbar-thumb {
  background-color: rgba(13, 76, 146, 0.2);
  border-radius: 10px;
}

.location-item {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s ease;
}

.location-item:hover {
  background-color: #f1f5f9;
}

.location-item.active {
  background-color: var(--color-primary);
  border-left: 4px solid var(--color-secondary);
}

.location-item.active .location-name,
.location-item.active .location-address {
  color: #fff !important;
}

.location-item.active .location-country {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.location-name {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: 5px;
  transition: color 0.2s ease;
}

.location-address {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 5px;
  transition: color 0.2s ease;
}

.location-country {
  display: inline-block;
  font-size: 0.75rem;
  background: #e9ecef;
  padding: 3px 8px;
  border-radius: 4px;
  color: #495057;
  font-weight: 600;
  transition: all 0.2s ease;
}

/*--------------------------------------------------------------
# Mapa Interactivo
--------------------------------------------------------------*/
.map-container {
  height: 600px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 2px solid #fff;
  z-index: 1; /* Para que no se ponga sobre el header fijo */
}

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

/* Custom Popup Styles */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
  margin: 0;
  width: 250px !important;
}

.popup-header {
  background-color: var(--color-primary);
  color: white;
  padding: 12px 15px;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

.popup-body {
  padding: 15px;
}

.popup-body p {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #495057;
}

.popup-body i {
  color: var(--color-primary);
  margin-right: 5px;
  width: 16px;
  text-align: center;
}

.popup-body a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.popup-body a:hover {
  color: var(--color-secondary) !important;
  text-decoration: underline;
}

.leaflet-popup-close-button {
  color: white !important;
  font-weight: bold;
  padding: 8px 8px 0 0 !important;
}

/*--------------------------------------------------------------
# Marker Cluster Custom Styles
--------------------------------------------------------------*/
.marker-cluster-custom, .marker-cluster-bolplan {
  background: transparent;
}

.cluster-rectangular-logo {
  background-color: white;
  height: 35px;
  min-width: 70px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 2px solid var(--color-primary);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.cluster-rectangular-logo img {
  height: 100%;
  max-width: 80px;
  object-fit: contain;
}

.cluster-pin-tip {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--color-primary);
}

.cluster-bolplan {
  width: 45px;
  height: 45px;
  background-color: var(--color-primary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.cluster-bolplan i {
  color: white;
  font-size: 1.2rem;
}

.cluster-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff4d4d;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/*--------------------------------------------------------------
# Retail Sales CTA
--------------------------------------------------------------*/
.retail-cta-section {
  padding-bottom: 40px;
  background-color: #f8f9fa;
}

.retail-cta-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1c5da1 100%);
  border-radius: 15px;
  padding: 20px 40px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 30px rgba(13, 76, 146, 0.2);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.retail-cta-box::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.retail-cta-box h2 {
  font-weight: 800;
  margin-bottom: 5px;
  font-size: 1.4rem;
  color: #fff;
}

.retail-cta-box p {
  font-size: 1rem;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.95);
}

.retail-cta-box .small-text {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0;
  display: block;
}

.btn-cta-whatsapp {
  background-color: #25d366;
  color: #fff !important;
  padding: 10px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid transparent !important;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn-cta-whatsapp:hover, .btn-cta-whatsapp:focus {
  background-color: transparent !important;
  color: #25d366 !important;
  border-color: #25d366 !important;
  box-shadow: none;
}

.btn-cta-whatsapp i {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .retail-cta-box h2 {
    font-size: 1.7rem;
  }
  .retail-cta-box p {
    font-size: 1.1rem;
  }
  .retail-cta-box {
    padding: 40px 20px;
  }
}

#btn-geolocation.btn-outline-blue {
  font-size: 13px;
  padding: 10px 18px;
  margin-top: 10px;
  justify-content: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
}

#btn-geolocation.btn-outline-blue:disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.65;
  background-color: transparent !important;
  color: #0d4c92 !important;
  border-color: #0d4c92 !important;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.user-popup-content {
  text-align: center;
  color: #0d4c92 !important;
  font-weight: 700 !important;
  font-family: "Poppins", sans-serif;
  margin: 0;
  white-space: nowrap;
}

/* Collapse default wide Leaflet popups just for the user location popup */
.leaflet-popup:has(.user-popup-content) .leaflet-popup-content-wrapper {
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(13, 76, 146, 0.15);
}

.leaflet-popup:has(.user-popup-content) .leaflet-popup-content {
  margin: 4px 8px !important;
  width: auto !important;
}
