/* Regional multisite switcher. */
.header__top {
  position: relative;
  z-index: 20;
}

.header__menu-wrap {
  z-index: 5;
  background: #2b2835;
}

.region-switch {
  position: relative;
  color: #2b2835;
  font-family: inherit;
  line-height: 1.2;
}

.region-switch__button,
.region-switch__link {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  color: #2b2835;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.region-switch__button {
  min-height: 54px;
  padding: 0 15px;
  gap: 10px;
  border: 1px solid #dfe1e6;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(20, 25, 40, 0.07);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.region-switch__button:hover,
.region-switch__button:focus-visible,
.region-switch.is-open .region-switch__button {
  border-color: #ffc700;
  box-shadow: 0 7px 22px rgba(20, 25, 40, 0.12);
  outline: none;
}

.region-switch__current {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.region-switch__pin {
  width: 17px;
  height: 21px;
  flex: 0 0 17px;
  background: url('../img/icons/place.svg') center / contain no-repeat;
}

.region-switch__arrow {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.region-switch.is-open .region-switch__arrow {
  transform: translateY(2px) rotate(225deg);
}

.region-switch__list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: max-content;
  min-width: 100%;
  max-width: 280px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid #e4e5e9;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(20, 25, 40, 0.18);
}

.region-switch__list[hidden] {
  display: none !important;
}

.region-switch__item {
  margin: 0;
  padding: 0;
}

.region-switch__item + .region-switch__item {
  margin-top: 3px;
}

.region-switch__link {
  min-height: 44px;
  padding: 8px 12px;
  gap: 10px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.region-switch__link:hover,
.region-switch__link:focus-visible {
  background: #f2f3f5;
  outline: none;
}

.region-switch__item.is-current .region-switch__link {
  background: linear-gradient(90deg, rgba(255, 199, 0, 0.2), rgba(255, 199, 0, 0.08));
  font-weight: 700;
}

.region-switch__check {
  width: 8px;
  height: 14px;
  margin-left: auto;
  margin-right: 3px;
  border-right: 2px solid #2b2835;
  border-bottom: 2px solid #2b2835;
  transform: rotate(45deg);
}

.region-switch--desktop {
  width: 185px;
  flex: 0 0 185px;
}

.region-switch--mobile {
  display: none;
}

@media (min-width: 1200px) {
  .header__top .container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 18px;
  }

  .header__top .logo._header {
    display: flex;
    width: 220px;
    max-width: 220px;
    flex: 0 0 220px;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
  }

  .header__top .logo._header img {
    flex: 0 0 auto;
  }

  .header__top .logo._header span {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
  }

  .header__adress {
    flex: 1 1 360px;
    min-width: 280px;
    margin-right: 0;
    margin-left: 0;
  }

  .header__phone-wrap {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .header__contacts {
    margin-right: 16px;
  }
}

@media (min-width: 1200px) and (max-width: 1320px) {
  .header__top .container {
    gap: 13px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .header__top .logo._header {
    width: 205px;
    max-width: 205px;
    flex-basis: 205px;
  }

  .header__top .logo._header span {
    max-width: 125px;
    font-size: 15px;
  }

  .region-switch--desktop {
    width: 168px;
    flex-basis: 168px;
  }

  .region-switch__button {
    padding-right: 12px;
    padding-left: 12px;
  }

  .region-switch__current,
  .region-switch__link {
    font-size: 14px;
  }

  .header__adress {
    min-width: 245px;
    font-size: 14px;
  }

  .header__contacts {
    margin-right: 10px;
  }

  .header__phone,
  .header__email {
    font-size: 14px;
  }

  .but._header {
    width: 154px;
    font-size: 14px;
  }
}

@media (max-width: 1199px) {
  .region-switch--desktop {
    display: none;
  }

  .region-switch--mobile {
    display: block;
    width: 100%;
    margin-top: 22px;
  }

  .region-switch--mobile .region-switch__button {
    min-height: 50px;
  }

  .region-switch--mobile .region-switch__list {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 7px;
    box-shadow: 0 8px 22px rgba(20, 25, 40, 0.12);
  }
}

@media (max-width: 575px) {
  .region-switch__current,
  .region-switch__link {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .region-switch__button,
  .region-switch__link,
  .region-switch__arrow {
    transition: none;
  }
}

/* Header/tablet navigation consistency for every regional site. */
@media (max-width: 1199px) {
  /* Switch to the burger navigation before the desktop menu becomes cramped. */
  .header__menu-wrap {
    display: none;
  }

  .burger {
    display: block;
    flex: 0 0 32px;
    margin: 0 0 0 8px;
  }

  /* The mobile menu must use the light modal background, not desktop nav colors. */
  #modal-menu .header__menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    margin: 30px 0 0;
    padding: 0 12px;
    background: transparent !important;
  }

  #modal-menu .header__menu > li {
    width: 100%;
    margin-right: 0 !important;
    padding: 0;
    color: #2b2835 !important;
    font-weight: 600;
  }

  #modal-menu .header__menu > li:not(:last-child) {
    margin-bottom: 18px;
  }

  #modal-menu .header__menu > li > a,
  #modal-menu .header__menu .sub-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 28px;
    color: #2b2835 !important;
    background: transparent;
    text-decoration: none;
  }

  #modal-menu .header__menu .sub-menu,
  #modal-menu .header__menu .sub-menu.active {
    width: 100%;
    max-width: 100%;
    background: #fff !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .header__top .container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 14px;
    padding: 8px 15px;
  }

  .header__top .logo._header {
    width: 220px;
    max-width: 220px;
    flex: 0 0 220px;
  }

  .header__adress:not(._menu-mobile) {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 14px;
  }

  .header__phone-wrap {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .header__contacts {
    margin-right: 10px;
  }

  .header__phone,
  .header__email {
    font-size: 14px;
  }

  .but._header {
    width: 145px;
    font-size: 14px;
  }
}

@media (min-width: 992px) and (max-width: 1080px) {
  /* Long regional addresses are available inside the burger menu at this width. */
  .header__adress:not(._menu-mobile) {
    display: none;
  }
}
