.location.map-only .directions-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  align-items: center;
  gap: clamp(28px, 4vw, 60px);
  width: min(88%, 1320px);
  margin: 0 auto;
  padding-block: clamp(34px, 4vw, 60px);
  color: #292d25;
}

.directions-info .directions-title {
  margin: 0 0 18px;
  color: #292d25;
  font: 400 clamp(33px, 3.5vw, 52px)/1.06 Georgia, serif;
  letter-spacing: -.04em;
}

.directions-info .directions-address {
  margin: 0 0 8px;
  font: 650 clamp(17px, 1.4vw, 20px)/1.4 Arial, sans-serif;
}

.directions-info .directions-walk {
  max-width: 45ch;
  margin: 0;
  color: #414539;
  font: 400 15px/1.55 Arial, sans-serif;
}

.directions-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.directions-info .directions-route {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #272d24;
  border-radius: 4px;
  background: #272d24;
  color: #fcf8ed;
  text-align: center;
  text-decoration: none;
  font: 650 13px/1.35 Arial, sans-serif;
}

.directions-info .directions-route:hover {
  background: #424a37;
}

.directions-info .directions-route-secondary {
  border-color: #8c8a78;
  background: transparent;
  color: #272d24;
}

.directions-info .directions-route-secondary:hover {
  background: #e0daca;
}

.directions-info .directions-route:focus-visible {
  outline: 2px solid #775c27;
  outline-offset: 3px;
}

.directions-layout .route-picture {
  max-width: none;
  margin: 0;
  overflow: hidden;
  border: 1px solid #c9c0ad;
  border-radius: 6px;
  cursor: zoom-in;
}

.directions-layout .route-picture img {
  height: auto;
  max-height: none;
}

@media (max-width: 1040px) {
  .location.map-only .directions-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: min(calc(100% - 40px), 760px);
  }

  .directions-actions {
    max-width: 470px;
  }
}

@media (max-width: 480px) {
  .directions-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.route-map-dialog {
  width: min(1320px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 16px;
  overflow: hidden;
  border: 1px solid #b9ae98;
  border-radius: 8px;
  background: #eeeade;
  color: #292d25;
}

.route-map-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.route-map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.route-map-header h2 {
  margin: 0;
  font: 400 clamp(22px, 3vw, 29px)/1.15 Georgia, serif;
}

.route-map-controls {
  display: flex;
  gap: 8px;
}

.route-map-controls button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #777661;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: 650 14px/1.3 Arial, sans-serif;
  cursor: pointer;
}

.route-map-controls [data-close] {
  border-color: #272d24;
  background: #272d24;
  color: #fcf8ed;
}

.route-map-controls button:focus-visible,
.route-map-view:focus-visible {
  outline: 2px solid #775c27;
  outline-offset: 2px;
}

.route-map-view {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #c9c0ad;
  border-radius: 4px;
}

.route-map-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 138px);
  object-fit: contain;
}

.route-map-dialog.is-zoomed .route-map-view img {
  width: max(150%, 900px);
  max-width: none;
  max-height: none;
}

@media (max-width: 500px) {
  .route-map-dialog {
    width: calc(100% - 20px);
    padding: 10px;
  }
}
