/* Provider map overrides and map page layout, kept out of the Tailwind entry. */

.search-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .search-layout {
    grid-template-columns: 280px minmax(0, 1fr) 380px;
  }
}

#map,
#map-single {
  width: 100%;
  border-radius: 0.75rem;
}

#map {
  height: 480px;
}

/* The add/edit position picker. Tall enough on a phone to aim a pin. */
#pin-map {
  width: 100%;
  height: 16rem;
  border-radius: 0.75rem;
}

#map-single {
  height: 18rem;
}

/* Destination + result markers */
.marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid white;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  cursor: pointer;
}

/* A result marker: the number the matching card shows. Big enough to hit with
   a thumb and to read a two-digit number in. */
.marker-numbered {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--color-accent-strong);
}

.marker-numbered:focus-visible,
.marker-cluster:focus-visible {
  outline: 3px solid var(--color-fg, #222);
  outline-offset: 2px;
}

/* A grid cell's count, for an area too full to draw one pin per spot. Larger
   and darker than a result marker, so a count never reads as a location. */
.marker-cluster {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--color-accent-dark);
  border: 2px solid white;
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.4);
  cursor: pointer;
}

/* Marker popup: name, distance/cost, and the way to the details page. Content
   is built with DOM APIs in search.js, so this only lays it out. */
.map-popup-name {
  font-weight: 600;
  line-height: 1.3;
}

.map-popup-meta {
  margin-top: 0.15rem;
  font-size: 12px;
  color: var(--color-muted, #666);
}

.map-popup-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.marker-destination {
  position: relative;
  width: 28px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.marker-destination::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 50% 50% 50% 0;
  background: var(--color-accent-dark);
  box-shadow: 0 1px 5px rgb(0 0 0 / 0.4);
  transform: rotate(-45deg);
}

.marker-destination::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

/* The "before" pin on a move proposal's mini-map: hollow and muted, so the
   proposed position (a solid accent dot) reads as the change. */
.marker-before {
  background: transparent;
  border: 2px dashed var(--color-muted, #888);
  box-shadow: none;
}

/* The draggable picker pin: bigger than a result marker, and it says so. */
.marker-pin {
  width: 24px;
  height: 24px;
  background: var(--color-accent-dark);
  cursor: grab;
}

.marker-pin:active {
  cursor: grabbing;
}

.marker.selected {
  outline: 3px solid var(--color-accent-strong);
  outline-offset: 1px;
}

/* Card ↔ marker selection highlight */
[data-parking-id].selected {
  border-color: var(--color-accent-strong);
  box-shadow: 0 0 0 2px var(--color-accent-strong);
}
