/* =========================================================================
   Выбор города (modules/pion585city)

   Десктоп — переключатель слева в верхней строке шапки, перед телефоном.
   Мобильная — копия блока в панели меню (#mobile-header-panel), её создаёт
   views/js/city.js. Границы 1280 / 1279 — те же, что у шапки и панели в теме.
   ========================================================================= */

.pion585city {
  position: relative;
}

.pion585city__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  line-height: 26px;
  color: #18181B;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.pion585city__toggle::-webkit-details-marker {
  display: none;
}

.pion585city__toggle::marker {
  content: '';
}

.pion585city__pin,
.pion585city__chevron {
  width: fit-content !important;
  height: fit-content !important;
}

.pion585city__pin {
  flex: 0 0 auto;
  color: #FFBA17;
}

.pion585city__label {
  border-bottom: 1px dashed #A1A1AA;
  line-height: 16px;
}

.pion585city__chevron {
  flex: 0 0 auto;
  color: #71717B;
  transition: transform 0.2s ease;
}

.pion585city[open] .pion585city__chevron {
  transform: rotate(180deg);
}

.pion585city__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10040;
  width: 400px;
  padding: 16px;
  background: #fff;
  border: 1px solid #F4F4F5;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.14);
  text-align: left;
}

.pion585city__title {
  margin: 0 0 8px;
  padding: 0 10px;
  font-family: InterRegular, Arial, sans-serif;
  font-size: 12px;
  line-height: 16px;
  color: #71717B;
}

.pion585city__list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 8px;
}

.pion585city__list li {
  margin: 0;
  padding: 0;
  break-inside: avoid;
}

.pion585city__item,
.pion585city__item:visited {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-family: InterRegular, Arial, sans-serif;
  font-size: 14px;
  line-height: 18px;
  color: #18181B;
  text-decoration: none;
}

.pion585city__item:hover,
.pion585city__item:focus {
  background: #F4F4F5;
  color: #18181B;
  text-decoration: none;
}

.pion585city__item.is-active {
  background: #F4F4F5;
  font-family: InterSemiBold, InterRegular, Arial, sans-serif;
}

/* Копия для мобильного меню вне панели не показывается. */
.pion585city--mobile {
  display: none;
}

@media (min-width: 1280px) {
  /* город и телефон в одну строку */
  #header .header-nav .left-nav {
    display: flex;
    align-items: center;
    gap: 24px;
  }
}

@media (max-width: 1279px) {
  .mobile-header-panel .pion585city--mobile {
    display: block;
    align-self: stretch;
    flex: 0 0 auto;
    margin: 0 0 8px;
  }

  .pion585city--mobile .pion585city__toggle {
    display: flex;
    justify-content: center;
    padding: 6px 0;
    font-family: InterRegular, Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
  }

  .pion585city--mobile .pion585city__dropdown {
    position: static;
    width: auto;
    margin-top: 4px;
    padding: 8px;
    border-radius: 12px;
    box-shadow: none;
  }

  .pion585city--mobile .pion585city__title {
    display: none;
  }
}
