/**
 * Sha Money Mithra Finserv — Interactive Map Showcase Styles
 */

.finserv-map-section {
  position: relative;
  background: var(--bg-light, #F8FAFC);
}

.finserv-map-container {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(26, 32, 44, 0.18), 0 0 0 1px rgba(158, 27, 50, 0.08);
  background: #0f172a;
}

/* Map Top Header / Control Toolbar */
.finserv-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1000;
}

.finserv-map-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1E293B;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.finserv-map-status-pill .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseLiveDot 1.8s infinite;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Layer Switcher Buttons */
.finserv-map-layer-switch {
  display: inline-flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.finserv-layer-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748B;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.finserv-layer-btn:hover {
  color: #0F172A;
}

.finserv-layer-btn.active {
  background: #FFFFFF;
  color: #9E1B32;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* Viewport Area */
.finserv-map-viewport {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 480px;
}

@media (max-width: 768px) {
  .finserv-map-viewport {
    height: 420px;
    min-height: 380px;
  }
}

.finserv-map-canvas {
  width: 100%;
  height: 100%;
  z-index: 10;
}

.google-embed-frame {
  width: 100%;
  height: 100%;
  display: none;
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 15;
}

/* Floating Glassmorphism Location Card Overlay */
.finserv-map-glass-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  max-width: 360px;
  width: calc(100% - 48px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.2);
  border-radius: 18px;
  padding: 20px;
  z-index: 900;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 576px) {
  .finserv-map-glass-card {
    position: relative;
    bottom: auto;
    left: auto;
    max-width: 100%;
    width: 100%;
    border-radius: 0 0 24px 24px;
    box-shadow: none;
    background: #FFFFFF;
  }
}

.finserv-map-glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.28);
}

.glass-card-tag {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9E1B32;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.glass-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 8px;
  line-height: 1.3;
}

.glass-card-address {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 14px;
  line-height: 1.5;
}

.distance-result-badge {
  display: none;
  font-size: 0.8rem;
  color: #0F172A;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  width: 100%;
}

/* Radar Animated Pin Marker */
.finserv-radar-marker-wrap {
  position: relative;
}

.finserv-radar-marker {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finserv-marker-pin {
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 50% 4px;
  background: linear-gradient(135deg, #9E1B32 0%, #C9364B 100%);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(158, 27, 50, 0.5);
  border: 2.5px solid #FFFFFF;
  z-index: 2;
  position: relative;
}

.finserv-marker-pin i {
  transform: rotate(45deg);
  color: #FFD700;
  font-size: 1.1rem;
}

.finserv-radar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.finserv-radar-pulse.pulse-1 {
  width: 50px;
  height: 50px;
  background: rgba(158, 27, 50, 0.4);
  animation: radarRipple 2.2s infinite ease-out;
}

.finserv-radar-pulse.pulse-2 {
  width: 50px;
  height: 50px;
  background: rgba(255, 215, 0, 0.4);
  animation: radarRipple 2.2s infinite 0.7s ease-out;
}

@keyframes radarRipple {
  0% {
    width: 20px;
    height: 20px;
    opacity: 1;
  }
  100% {
    width: 90px;
    height: 90px;
    opacity: 0;
  }
}

/* Rich Popup Customization */
.finserv-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(158, 27, 50, 0.1);
}

.finserv-leaflet-popup .leaflet-popup-content {
  margin: 12px 14px;
  line-height: 1.4;
}

.finserv-map-popup .popup-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9E1B32;
  margin-bottom: 4px;
}

.finserv-map-popup .popup-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.finserv-map-popup .popup-rating .stars {
  color: #F59E0B;
  font-size: 0.8rem;
  margin-right: 4px;
}

.finserv-map-popup .popup-rating .rating-text {
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 600;
}

.finserv-map-popup .popup-address {
  font-size: 0.8rem;
  color: #475569;
  margin-bottom: 8px;
}

.finserv-map-popup .popup-hours {
  font-size: 0.75rem;
  color: #10B981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.finserv-map-popup .popup-hours .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
}

/* User Location Ping */
.finserv-user-location-marker {
  position: relative;
  text-align: center;
}

.user-ping {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.4);
  animation: radarRipple 1.8s infinite ease-out;
}

/* Quick Map Actions Bar Floating in Top-Right */
.finserv-map-quick-actions {
  position: absolute;
  top: 18px;
  right: 60px; /* offset from Leaflet zoom control */
  z-index: 900;
  display: flex;
  gap: 8px;
}

.btn-map-control {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E293B;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-map-control:hover {
  background: #9E1B32;
  color: #FFFFFF;
  border-color: #9E1B32;
  transform: translateY(-2px);
}

/* Multi-Branch Selector Bar */
.finserv-branch-bar {
  background: #FFFFFF;
  transition: all 0.3s ease;
}

.branch-select-btn {
  font-weight: 600;
  font-size: 0.82rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.branch-select-btn:hover {
  transform: translateY(-1px);
}

.btn-find-nearest-branch {
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.25s ease;
}

.btn-find-nearest-branch:hover {
  background: #9E1B32;
  border-color: #9E1B32;
  transform: translateY(-1px);
}

