/* Map-card layout — layout-specific rules only (shared: frontend-shared.css). */

/* Section header above map: spacing so header and map don’t collide */
.rmfw-section-header + .rmfw-layout-map-card {
  margin-top: 0.75rem;
}

/* Map card shell */
.rmfw-layout-map-card {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  background-color: var(--card, #ffffff);
}

/* List-only: map header hidden via settings (showMapCardMap off). */
.rmfw-layout-map-card--no-map .rmfw-map-card-list {
  border-radius: inherit;
}

.rmfw-map-card-header {
  position: relative;
  height: 10rem;
  background-image: linear-gradient(
    to bottom right,
    var(--muted, #e5e7eb),
    color-mix(in oklab, var(--muted, #e5e7eb) 50%, transparent)
  );
}

.rmfw-map-card-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-color: var(--muted, #e5e7eb);
}

.rmfw-map-card-header-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.rmfw-map-card-header--map-ready .rmfw-map-card-header-fallback {
  opacity: 0;
  visibility: hidden;
  z-index: 0;
}

/* When the live map is active, keep the canvas above the (hidden) fallback
   so Google / Leaflet zoom UI isn’t trapped under a transparent sibling. */
.rmfw-map-card-header--map-ready .rmfw-map-card-map-canvas {
  z-index: 3;
}

.rmfw-map-card-map-canvas .rmfw-product-map-pin {
  background: transparent !important;
  border: none !important;
}

.rmfw-map-card-header-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rmfw-map-card-header-content {
  text-align: center;
}

.rmfw-map-card-header-icon {
  margin: 0 auto 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rmfw-map-card-header-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground, #6b7280);
}

.rmfw-map-card-dot {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

.rmfw-map-card-dot--1 {
  top: 1.5rem;
  left: 2.5rem;
}

.rmfw-map-card-dot--2 {
  top: 3rem;
  right: 4rem;
}

.rmfw-map-card-dot--3 {
  bottom: 2rem;
  left: 33%;
}

.rmfw-map-card-list {
  max-height: 16rem;
  overflow-y: auto;
  background-color: var(--card, #ffffff);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
}

/* List cards in the map strip: click row → map focus (product-map-card.js) */
.rmfw-layout-map-card .rmfw-map-card-list .rmfw-card-list[data-rmfw-retailer-id] {
  cursor: pointer;
}

.rmfw-layout-map-card .rmfw-map-card-list .rmfw-card-list--map-active {
  outline: 2px solid var(--primary, #4f46e5);
  outline-offset: -2px;
  background-color: color-mix(
    in oklab,
    var(--primary, #4f46e5) 8%,
    transparent
  );
}
