/* СЕКЦИИ: карта (t125), футер (t389), попапы (t702/t657/t131) */

/* ── Карта ────────────────────────────────────────────────────── */
/* Фон виден до подстановки iframe. */
.map {
  position: relative;
  height: 390px;
  background: linear-gradient(160deg, #0d0e4f 0%, #251752 100%);
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Футер ────────────────────────────────────────────────────── */
.site-footer {
  padding-block: 30px;
  background: var(--c-navy);
  color: #fff;
}

.site-footer__inner {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.site-footer__copy {
  flex: 1 1 230px;
  font-size: 10px;
  line-height: 13.5px;
  font-weight: 600;
}

.site-footer__nav {
  flex: 1 1 auto;
  text-align: center;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 18.9px;
  font-weight: 600;
}

.site-footer__list a:hover {
  color: var(--c-magenta);
}

.site-footer__top {
  flex: 0 0 auto;
  text-align: right;
}

.site-footer__toplink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 18.9px;
  font-weight: 600;
  color: #fff;
}

.site-footer__toplink:hover {
  color: var(--c-magenta);
}

.site-footer__topicon {
  fill: currentColor;
}

/* ── Попап с формой ──────────────────────────────────────────── */
.popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup[hidden] {
  display: none;
}

.popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 14, 79, .8);
}

.popup__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 48px 40px 36px;
  border-radius: 10px;
  background: #fff;
  color: var(--c-navy);
}

.popup__close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
}

.popup__close svg {
  width: 100%;
  height: 100%;
  fill: none;
}

.popup__close:hover svg path {
  stroke: var(--c-magenta);
}

.popup__title {
  margin-bottom: 26px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  text-align: center;
}

/* Форма в попапе: тёмная рамка, как в Tilda */
.cform--popup .cform__input {
  color: var(--c-navy);
  border-color: var(--c-navy);
}

.cform--popup .cform__policy,
.cform--popup .cform__error {
  color: var(--c-navy);
}

.cform__policy {
  margin-top: 20px;
  font-size: 14px;
  line-height: 21.7px;
  font-weight: 300;
  color: #fff;
}

.cform__policy a {
  border-bottom: 1px solid currentColor;
}

.cform__policy a:hover {
  color: var(--c-magenta);
}

/* ── Выбор города ────────────────────────────────────────────── */
.city-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-popup[hidden] {
  display: none;
}

.city-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px);
}

.city-popup__inner {
  position: relative;
  max-width: 500px;
  width: calc(100% - 32px);
  padding: 32px 28px 28px;
  border-radius: 24px;
  border: 2px solid transparent;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(135deg, #ff4fd8, #ff7a00, #00c3ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.city-popup__close {
  position: absolute;
  right: 16px;
  top: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .04);
  font-size: 18px;
  line-height: 1;
  color: #555;
  transition: background var(--t-fast), transform var(--t-fast);
}

.city-popup__close:hover {
  background: rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}

.city-popup__title {
  margin-bottom: 20px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: #1f1f33;
}

.city-popup__grid,
.city-popup__buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.city-popup__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f7fa;
  border: 1.5px solid #ebebf0;
  text-decoration: none;
  color: #1f1f33;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  cursor: pointer;
  position: relative;
  text-align: left;
}

.city-popup__btn:hover:not(.city-popup__btn--disabled):not(.city-popup__btn--active):not(.city-popup__btn--primary) {
  transform: translateY(-2px);
  border-color: #ff3fbf;
  box-shadow: 0 8px 20px rgba(255, 63, 191, .2);
  background: #fff;
  color: #1f1f33;
}

.city-popup__btn--active,
.city-popup__btn--primary {
  background: linear-gradient(135deg, #ff3fbf 0%, #ff7a00 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 8px 24px rgba(255, 63, 191, .35);
}

.city-popup__btn--active:hover,
.city-popup__btn--primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ff2ab2 0%, #ff6f00 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 28px rgba(255, 63, 191, .5);
}

.city-popup__btn--active .city-popup__btn-name,
.city-popup__btn--primary .city-popup__btn-name {
  color: #ffffff !important;
}

.city-popup__btn--active .city-popup__btn-mall,
.city-popup__btn--primary .city-popup__btn-mall {
  color: #ffffff !important;
  opacity: 0.9;
}
.city-popup__btn--disabled {
  opacity: .6;
  cursor: not-allowed;
  background: #f0f0f4;
  border-style: dashed;
}

.city-popup__btn-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.city-popup__btn-mall {
  font-size: 12px;
  color: #777788;
  margin-top: 4px;
}

.city-popup__soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #ff3fbf;
  background: rgba(255, 63, 191, .12);
  padding: 3px 8px;
  border-radius: 999px;
  margin-top: 4px;
}
/* ── Cookie ──────────────────────────────────────────────────── */
.cookie {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 900px;
  margin-inline: auto;
  padding: 18px 22px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.cookie[hidden] {
  display: none;
}

.cookie__text {
  flex: 1 1 auto;
  font-size: 13px;
  line-height: 18px;
  font-weight: 300;
}

.cookie__btn {
  flex: 0 0 auto;
  padding: 10px 24px;
}

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 959px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
  }

  .site-footer__copy {
    order: 2;
    flex-basis: auto;
    font-size: 14px;
    line-height: 18.9px;
  }

  .site-footer__nav {
    order: 1;
  }

  .site-footer__top {
    order: 3;
    text-align: center;
  }

  .site-footer__list {
    font-size: 12px;
    line-height: 16.2px;
  }

  .popup__dialog {
    padding: 42px 24px 30px;
  }

  .popup__title {
    font-size: 18px;
    line-height: 24px;
  }
}

@media (max-width: 639px) {
  .cookie {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .city-popup__inner {
    padding: 26px 20px 22px;
    border-radius: 20px;
  }

  .city-popup__title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .city-popup__grid,
  .city-popup__buttons {
    grid-template-columns: 1fr;
  }

  .map {
    height: 320px;
  }
}

/* ── Юридическая страница (t050) ─────────────────────────────── */
.legal {
  padding-block: 60px 90px;
}

.legal__title {
  margin-bottom: 28px;
  font-size: 26px;
  line-height: 34px;
  font-weight: 700;
}

.legal__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 900px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 300;
}

.legal__back {
  margin-top: 36px;
  min-width: 200px;
  min-height: 50px;
}

@media (max-width: 639px) {
  .legal {
    padding-block: 40px 56px;
  }

  .legal__title {
    font-size: 22px;
    line-height: 28px;
  }

  .legal__text {
    font-size: 14px;
    line-height: 21px;
  }
}
