/* ==========================================================================
   MAP POPUP STYLES - Custom styles for Leaflet popups
   ========================================================================== */

/* Popup container */
.leaflet-popup-content-wrapper {
  background: white;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  padding: 0 !important;
  overflow: hidden;
  max-width: 280px !important;
  width: 280px !important;
}

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

/* Popup tip (flecha) */
.leaflet-popup-tip {
  background: white !important;
  box-shadow: 0 3px 14px rgba(0,0,0,0.15) !important;
}

/* Close button */
.leaflet-popup-close-button {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  top: 12px !important;
  right: 12px !important;
  background: rgba(31, 37, 72, 0.1) !important;
  border-radius: 50% !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
}

.leaflet-popup-close-button:hover {
  background: rgba(31, 37, 72, 0.2) !important;
  transform: scale(1.1) !important;
}

.leaflet-popup-close-button span {
  font-size: 24px !important;
  line-height: 1 !important;
  color: #1F2548 !important;
  font-weight: 300 !important;
}

/* Popup header */
.map-popup-header {
  background: linear-gradient(135deg, #1F2548 0%, #3B5BA1 100%);
  padding: 1rem;
  color: white;
  position: relative;
  padding-right: 2.75rem; /* Space for close button */
}

.map-popup-store-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.map-popup-store-flag {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

/* Devir Store badge in popup */
.map-popup-ds-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #856404;
  font-size: 0.7rem;
  font-weight: 600;
  gap: 4px;
  margin-top: 0.25rem;
}

.map-popup-ds-badge img {
  width: 12px;
  height: 12px;
}

/* Popup body */
.map-popup-body {
  padding: 1rem;
}

.map-popup-info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: #4a5568;
  line-height: 1.4;
}

.map-popup-info-row strong {
  color: #1F2548;
  font-weight: 600;
  flex-shrink: 0;
}

/* Game badge */
.map-popup-game-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  margin: 0.5rem 0 0.65rem 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.map-popup-game-badge img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Ver evento button */
.map-popup-btn-ver-evento {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  background: linear-gradient(180deg, #eb7a9a 0%, #ce466c 15%, #f82d98 100%);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(206, 70, 108, 0.3);
  cursor: pointer;
  border: none;
}

.map-popup-btn-ver-evento:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(206, 70, 108, 0.4);
  filter: brightness(1.1);
  color: white;
  text-decoration: none;
}

.map-popup-btn-ver-evento:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
  .leaflet-popup-content-wrapper {
    max-width: 260px !important;
    width: 260px !important;
  }
  
  .leaflet-popup-content {
    width: 260px !important;
  }
  
  .map-popup-header {
    padding: 0.875rem;
  }
  
  .map-popup-body {
    padding: 0.875rem;
  }
  
  .map-popup-store-name {
    font-size: 0.95rem;
  }
}
