/* Route Map — Figma node 2535:4783 (402 × 874, nothing scrolls) */

/* ---------- header: status bar + top app bar + tabs (Figma 2634:5302) ---------- */
/* no fill: the tab row runs to y 148.35 and overlaps the top 3px of the map (map starts at y 145) */
.map-appbar { background: transparent; }
.map-appbar > .topbar { margin-bottom: -10px; }
.map-title {
  width: 177px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  line-height: 28px;
  color: var(--dark);
  white-space: nowrap;
}

/* Figma strokes sit inside the boxes, so borders are taken out of the padding (row 43px, tab 42px) */
.map-tabs {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px;
  border-bottom: 1px solid #e4e2e2;
}
.map-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 87.5px;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: var(--grey);
  text-align: center;
  white-space: nowrap;
  transition: color 150ms, border-color 150ms;
}
.map-tab:hover { color: var(--dark); }
.map-tab.is-active { border-bottom-color: var(--red); font-weight: 600; color: var(--red); }
.map-tab:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

/* ---------- map canvas (Figma 2535:4941: inset 123 0 -18 0, clipped by the frame) ---------- */
.map__canvas {
  position: absolute;
  top: 123px;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 751px; /* the frame bottom; shorter viewports scroll instead of covering the map */
  overflow: hidden;
  background: #fff;
}
/* "contents" group 2535:5495 in canvas coordinates; centred so wider/narrower phones keep pins on the route */
.map__view {
  position: absolute;
  left: 50%;
  top: 0;
  width: 402px;
  height: 635px;
  margin-left: -201px;
}
.map__img {
  position: absolute;
  left: 0;
  top: 22px;
  width: 402px;
  height: 613px;
  overflow: hidden;
  pointer-events: none;
}
.map__img img { position: absolute; left: 0; top: -16.5%; width: 100%; height: 116.52%; max-width: none; }

.map-stop {
  position: absolute;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  transition: transform 150ms;
}
.map-stop::after { content: ""; position: absolute; inset: -8px; border-radius: 9999px; } /* 36px tap target */
.map-stop img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.map-stop__num {
  position: relative;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  color: var(--red);
}
.map-stop:hover { transform: scale(1.15); }
.map-stop:active { transform: scale(0.95); }
.map-stop:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.map-label {
  position: absolute;
  width: 79px;
  transform: translateY(-50%);
  font-size: 10px;
  line-height: 14px;
  color: var(--dark);
}

/* 2535:5525: black → White75 in screen blend, so it only lightens the bottom of the map */
.map__fade {
  position: absolute;
  left: 0;
  top: 525px;
  width: 402px;
  height: 110px;
  background: linear-gradient(to bottom, #000, var(--white75));
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ---------- map controls ---------- */
.map-controls {
  position: absolute;
  right: 19px;
  top: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}
.map-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fbf9f8;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: background-color 150ms, transform 150ms;
}
.map-ctrl--layers { height: 43.05px; }
.map-ctrl:hover { background: #f1edeb; }
.map-ctrl:active { transform: scale(0.95); }
.map-ctrl:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- next stop card + send button ---------- */
.map-next {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 82px; /* Figma bottom 100 from a canvas bottom 18px below the frame */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.map-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px; /* Figma p-17 includes the 1px inside stroke: card is 106px tall */
  border: 1px solid rgba(224, 191, 188, 0.3);
  border-radius: 8px;
  background: rgba(251, 249, 248, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: transform 150ms, box-shadow 150ms;
}
.map-card:hover { box-shadow: 0 12px 18px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.map-card:active { transform: scale(0.99); }
.map-card:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.map-card__thumb {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background: #efeded;
  overflow: hidden;
}
.map-card__img { position: relative; flex-shrink: 0; width: 64px; height: 64px; overflow: hidden; }
.map-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 65%;
}
.map-card__body {
  flex: 1 0 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-card__eyebrow { font-weight: 600; font-size: 12px; line-height: 16px; letter-spacing: 0.6px; color: var(--grey); }
.map-card__title { font-weight: 600; font-size: 20px; line-height: 28px; color: var(--dark); }
.map-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 20px;
  color: var(--grey);
  white-space: nowrap;
}
.map-card__dot { flex-shrink: 0; width: 4px; height: 4px; border-radius: 12px; background: var(--light-grey); }
.map-card__go {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 12px;
  transition: transform 150ms;
}
.map-card:hover .map-card__go { transform: translateX(2px); }

.map-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7.99px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 20px;
  background: var(--red);
  overflow: hidden;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.7px;
  color: var(--white75);
  text-align: center;
  white-space: nowrap;
  transition: background-color 150ms, transform 150ms;
}
.map-send:hover { background: #7a011f; }
.map-send:active { transform: scale(0.98); }
.map-send:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- bottom nav: Figma has it at bottom 0 (border line at y 801) ---------- */
.map-nav { bottom: 0; }
