/**
 * Muvesta — Leaflet map (OpenStreetMap tiles, no API key) + gold markers.
 */

body.wp-muvesta .mv-leaflet-wrap {
  position: relative;
  background: #0d0d0d;
  border: 1px solid color-mix(in srgb, var(--wp-accent, #c89a3d) 12%, rgba(255, 255, 255, 0.08));
  border-radius: 0;
  overflow: hidden;
}

/* Full-bleed branch map */
body.wp-muvesta .mv-branches-full {
  padding-bottom: clamp(3rem, 6vw, 4.5rem) !important;
}

body.wp-muvesta .mv-branches-full .mv-section-head {
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

body.wp-muvesta .mv-map-stage {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.wp-muvesta .mv-map-full-bleed {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  min-height: min(72vh, 640px);
  border-inline: none;
  border-block: 1px solid color-mix(in srgb, var(--wp-accent, #c89a3d) 12%, rgba(255, 255, 255, 0.08));
}

body.wp-muvesta .mv-map-full-bleed .mv-leaflet-map {
  min-height: min(72vh, 640px);
}

body.wp-muvesta .mv-branch-bar {
  margin-top: clamp(1.25rem, 3vw, 2rem);
}

body.wp-muvesta .mv-branch-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

body.wp-muvesta .mv-branch-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  background: #141210;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9a968c;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.35s, color 0.35s, background 0.35s, box-shadow 0.35s;
}

body.wp-muvesta .mv-branch-list-label {
  font-family: var(--wp-display, Georgia, serif);
  font-size: 1rem;
  font-weight: 500;
  color: #f5f3ed;
}

body.wp-muvesta .mv-branch-list-addr {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: #9a968c;
}

body.wp-muvesta .mv-branch-list-item:hover,
body.wp-muvesta .mv-branch-list-item.is-active {
  border-color: rgba(200, 154, 61, 0.4);
  background: rgba(200, 154, 61, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

body.wp-muvesta .mv-branch-list-item.is-active .mv-branch-list-label {
  color: #c89a3d;
}

body.wp-muvesta .mv-branch-panel {
  background: #141210;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.35rem 1.5rem;
}

body.wp-muvesta .mv-branch-actions {
  margin: 1.25rem 0 0;
}

@media (max-width: 960px) {
  body.wp-muvesta .mv-map-full-bleed,
  body.wp-muvesta .mv-map-full-bleed .mv-leaflet-map {
    min-height: min(58vh, 420px);
  }

  body.wp-muvesta .mv-branch-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  body.wp-muvesta .mv-branch-list-item {
    flex: 0 0 min(85vw, 300px);
    scroll-snap-align: start;
  }
}

body.wp-muvesta .mv-leaflet-map {
  width: 100%;
  height: 100%;
  min-height: inherit;
  z-index: 1;
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-container {
  background: #0a0a0a;
  font-family: inherit;
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.92) saturate(0.75);
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-control-zoom a {
  background: rgba(8, 8, 8, 0.92) !important;
  color: #f5f3ed !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-control-zoom a:hover {
  background: #141210 !important;
  color: #c89a3d !important;
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-control-attribution {
  background: rgba(5, 5, 5, 0.78) !important;
  color: #9a968c !important;
  font-size: 0.68rem;
  padding: 2px 6px;
}

body.wp-muvesta .mv-leaflet-wrap .leaflet-control-attribution a {
  color: #c89a3d !important;
}

/* Gold markers */
body.wp-muvesta .mv-leaflet-marker-wrap {
  background: transparent !important;
  border: none !important;
}

body.wp-muvesta .mv-leaflet-marker {
  width: 18px;
  height: 18px;
  margin-left: -9px !important;
  margin-top: -9px !important;
  border-radius: 50%;
  background: #c89a3d;
  border: 2px solid #050505;
  box-shadow: 0 0 0 0 rgba(200, 154, 61, 0.45);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

body.wp-muvesta .mv-leaflet-marker.is-active {
  transform: scale(1.25);
  box-shadow: 0 0 0 10px rgba(200, 154, 61, 0.2);
}

body.wp-muvesta .mv-leaflet-marker::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(200, 154, 61, 0.35);
  opacity: 0;
  animation: mvMarkerPulse 2.4s ease-out infinite;
}

body.wp-muvesta .mv-leaflet-marker.is-active::after {
  opacity: 1;
}

@keyframes mvMarkerPulse {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

body.wp-muvesta .mv-leaflet-popup .leaflet-popup-content-wrapper {
  background: #141210;
  color: #f5f3ed;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

body.wp-muvesta .mv-leaflet-popup .leaflet-popup-tip {
  background: #141210;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.wp-muvesta .mv-leaflet-popup .leaflet-popup-content {
  margin: 0.75rem 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

body.wp-muvesta .mv-leaflet-popup strong {
  display: block;
  font-family: var(--wp-display, Georgia, serif);
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: #f5f3ed;
}

/* Address label on marker (permanent tooltip) */
body.wp-muvesta .mv-leaflet-tooltip {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  pointer-events: none;
}

body.wp-muvesta .mv-leaflet-tooltip::before {
  display: none;
}

body.wp-muvesta .mv-map-label {
  background: #141210;
  border: 1px solid rgba(200, 154, 61, 0.28);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 0.65rem 0.85rem;
  max-width: 240px;
  text-align: left;
}

body.wp-muvesta .mv-leaflet-tooltip.is-active .mv-map-label {
  border-color: rgba(200, 154, 61, 0.55);
  box-shadow: 0 12px 32px rgba(200, 154, 61, 0.15);
}

body.wp-muvesta .mv-leaflet-tooltip.is-visible .mv-map-label {
  border-color: rgba(200, 154, 61, 0.22);
  opacity: 0.92;
}

body.wp-muvesta .mv-leaflet-marker {
  opacity: 1;
}

body.wp-muvesta .mv-leaflet-marker-wrap .mv-leaflet-marker:not(.is-active) {
  opacity: 0.88;
}

body.wp-muvesta .mv-map-label-title {
  display: block;
  font-family: var(--wp-display, Georgia, serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: #f5f3ed;
  margin: 0 0 0.25rem;
  line-height: 1.25;
}

body.wp-muvesta .mv-map-label-addr {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #9a968c;
}

body.wp-muvesta .mv-leaflet-popup .mv-map-label {
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: none;
}

body.wp-muvesta .mv-map-popup-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #c89a3d !important;
  text-decoration: none;
}

body.wp-muvesta .mv-map-popup-link:hover {
  color: #ddb65c !important;
  text-decoration: underline;
}

body.wp-muvesta .mv-map-voice {
  margin: 0.7rem 0 0;
  padding: 0.7rem 0 0;
  border-top: 1px solid rgba(200, 154, 61, 0.22);
}

body.wp-muvesta .mv-map-voice-quote {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #f5f3ed;
}

body.wp-muvesta .mv-map-voice-meta {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c89a3d;
}

body.wp-muvesta .mv-leaflet-popup.has-voice .leaflet-popup-content {
  max-width: 18rem;
}

@media (prefers-reduced-motion: reduce) {
  body.wp-muvesta .mv-leaflet-marker::after {
    animation: none;
  }
}
