/* ─── Фотобудка на карте: подпись кнопки и выбор приложения на телефоне ─────── */
/* Отдельным файлом, а не в styles.css: прод не шлёт Cache-Control, и новая разметка
   могла встретиться со старым styles.css из кеша — меню осталось бы без стилей.
   Разметка кнопки — steps/<город>/<шаг>/index.html, поведение — assets/map-chooser.js */

.stop-map-stub__label--touch {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .stop-map-stub__label--pointer {
    display: none;
  }

  .stop-map-stub__label--touch {
    display: inline;
  }
}

html.map-sheet-open,
html.map-sheet-open body {
  overflow: hidden;
}

.map-sheet {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.map-sheet[hidden] {
  display: none;
}

.map-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 48, 0.45);
  opacity: 0;
  transition: opacity 200ms ease;
}

.map-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100% - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 24px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.16);
  transform: translateY(100%);
  transition: transform 200ms cubic-bezier(0.4, 0, 1, 1);
}

.map-sheet.is-open .map-sheet__backdrop {
  opacity: 1;
}

.map-sheet.is-open .map-sheet__panel {
  transform: translateY(0);
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}

.map-sheet__eyebrow {
  margin: 0 4px 4px;
  font-size: 13px;
  line-height: 1.3;
  color: #888;
}

.map-sheet__title {
  margin: 0 4px 16px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-dark);
}

.map-sheet__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 16px;
  background: #f5f5f7;
  overflow: hidden;
}

.map-sheet__list li + li {
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.map-sheet__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 120ms ease;
}

.map-sheet__item:active {
  background: rgba(29, 29, 31, 0.06);
}

.map-sheet__item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.map-sheet__cancel:focus-visible {
  outline: 2px solid rgba(0, 122, 255, 0.35);
  outline-offset: 2px;
}

.map-sheet__item-icon {
  flex-shrink: 0;
  color: rgba(29, 29, 31, 0.4);
}

/* «Отмена» — залитая, как кнопка-геоточка в карточках маршрута (solutions-card__cta--icon) */
.map-sheet__cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border: none;
  border-radius: 14px;
  background: rgba(0, 122, 255, 0.10);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease;
}

.map-sheet__cancel:hover {
  background: rgba(0, 122, 255, 0.16);
}

.map-sheet__cancel:active {
  background: rgba(0, 122, 255, 0.20);
}

@media (prefers-reduced-motion: reduce) {
  .map-sheet__backdrop,
  .map-sheet__panel,
  .map-sheet.is-open .map-sheet__panel {
    transition: none;
  }

  .map-sheet__panel {
    transform: none;
  }
}
