/* Map layer extracted from service-directory.css */

/* Leaflet popup styling - keep it aligned with card styling */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
}

.leaflet-popup-content {
  margin: 0;
}

.leaflet-popup-content .dir-leaflet-card {
  min-width: 265px;
  max-width: 320px;
}

/* Leaflet popup content area should not inject extra spacing around our card */
.leaflet-popup-content {
  padding: 0;
}

/* Ensure icon alignment inside Leaflet popups */
.leaflet-popup-content .dir-leaflet-card i {
  width: 16px;
  display: inline-block;
  text-align: center;
}

.leaflet-container a.leaflet-popup-close-button {
  width: 30px;
  height: 30px;
  line-height: 28px;
  border-radius: 999px;
  margin: 8px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15, 23, 42, 0.12);
}
.leaflet-container a {
    color: inherit;
}

.leaflet-popup-content .dir-btn,
.leaflet-popup-content .dir-directions-link,
.leaflet-popup-content .dir-popup-view {
  color: #fff;
}

.leaflet-container a.leaflet-popup-close-button {
  color: #0f172a;
}

.dir-map-shell {
  position: relative;
  overflow: hidden;
}

.dir-map-state {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(2px);
}

.dir-map-state[hidden] {
  display: none !important;
}

.dir-map-state-card {
  max-width: 22rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.dir-map-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.dir-map-state-copy {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #334155;
}

.dir-map-spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.75rem;
  border-radius: 9999px;
  border: 3px solid #cbd5e1;
  border-top-color: #0ea5e9;
  animation: dir-spin 0.9s linear infinite;
}

@keyframes dir-spin {
  to { transform: rotate(360deg); }
}

#dir-services-list.dir-is-busy,
#dir-load-more-wrap.dir-is-busy,
#dir-map.dir-is-busy {
  opacity: .82;
}

@media (max-width: 767px) {
  .leaflet-popup-content .dir-leaflet-card {
    min-width: min(260px, calc(100vw - 56px));
    max-width: min(280px, calc(100vw - 56px));
    padding: 0.9rem !important;
  }

  .leaflet-popup-content .dir-leaflet-card h3 {
    font-size: 1.2rem;
    line-height: 1.2;
  }

  .leaflet-popup-content .dir-leaflet-card .dir-btn {
    min-height: 2.65rem;
  }

  .leaflet-container a.leaflet-popup-close-button {
    margin: 6px;
  }
}
