body.city-modal-open {
  overflow: hidden;
}

.nav-link--city[data-city-open] {
  appearance: none;
  padding: 0;
  font: inherit;
}

.city-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
}

.city-modal.is-open {
  display: block;
}

.city-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(49, 49, 49, 0.34);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.city-modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 72px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  margin: 12px auto;
  padding: 36px 36px 46px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.city-modal__close {
  position: fixed;
  top: 21px;
  right: 25px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.city-modal__close::before,
.city-modal__close::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 3px;
  right: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.city-modal__close::before {
  transform: rotate(45deg);
}

.city-modal__close::after {
  transform: rotate(-45deg);
}

.city-modal__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.city-modal h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
}

.city-modal a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-bottom: 9px;
  border: 1px solid var(--wine);
  border-radius: 999px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  transition: background-color 160ms ease, color 160ms ease;
}

.city-modal a:hover,
.city-modal a:focus-visible {
  background: var(--wine);
  color: var(--paper);
  outline: 0;
}

@media (max-width: 980px) {
  .city-modal__panel {
    width: min(760px, calc(100% - 32px));
    padding: 38px 28px 34px;
  }

  .city-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .city-modal__panel {
    width: calc(100% - 22px);
    max-height: calc(100dvh - 24px);
    margin: 12px auto;
    padding: 58px 18px 26px;
  }

  .city-modal__grid {
    grid-template-columns: 1fr;
  }

  .city-modal h2 {
    font-size: 30px;
  }

  .city-modal a {
    min-height: 44px;
  }
}
