/* Load after the template CSS. Assets: /local/assets/max/ */
.social .social__item--image > a.social__link[href^="https://max.ru/"] {
  position: relative;
  background: none !important;
}
.social .social__item--image > a.social__link[href^="https://max.ru/"]::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("/local/assets/max/max-colored.svg") center / 21px 21px no-repeat;
}
.social--picture-svg a.social__link[href^="https://max.ru/"] .svg-inline-tw {
  display: inline-block;
  width: 13px;
  height: 13px;
  background-color: currentColor;
  -webkit-mask: url("/local/assets/max/max-dark.svg") center / contain no-repeat;
  mask: url("/local/assets/max/max-dark.svg") center / contain no-repeat;
}
.social--picture-svg a.social__link[href^="https://max.ru/"] .svg-inline-tw svg {
  display: none;
}
.social-dark .social__item--image > a.social__link[href^="https://max.ru/"]:not(:hover)::before {
  background-image: url("/local/assets/max/max-white.svg");
}
.social-light .social__item--image > a.social__link[href^="https://max.ru/"]:not(:hover)::before {
  background-image: url("/local/assets/max/max-dark.svg");
}

/* Preserve the existing muted footer icon and its hover behavior. */
.footer__social.social-dark .social__item--image > a.social__link[href^="https://max.ru/"]:not(:hover),
.footer__social.social-light .social__item--image > a.social__link[href^="https://max.ru/"]:not(:hover) {
  opacity: .5;
}
.footer__social .social__item--image > a.social__link[href^="https://max.ru/"]:hover {
  opacity: 1;
}

/* Footer: match the light, compact neighboring messenger symbols. */
.footer__social .social__item--image > a.social__link[href^="https://max.ru/"]::before {
  background-size: 16px 16px;
}

/* Color buttons in phone dropdowns, mobile menu and contacts. */
.social .social__item--image > a.social__link[href^="https://max.ru/"] {
  background: #471aff !important;
}
.social .social__item--image > a.social__link[href^="https://max.ru/"]::before {
  background-image: url("/local/assets/max/max-white.svg");
  background-size: 17px 17px;
}
/* Footer keeps its original tile background and muted light symbols. */
.footer__social .social__item--image > a.social__link[href^="https://max.ru/"] {
  background: transparent !important;
}
.footer__social .social__item--image > a.social__link[href^="https://max.ru/"]::before {
  background-size: 16px 16px;
}
.footer__social.social-dark .social__item--image > a.social__link[href^="https://max.ru/"]:not(:hover)::before {
  background-image: url("/local/assets/max/max-white.svg");
}
.footer__social.social-light .social__item--image > a.social__link[href^="https://max.ru/"]:not(:hover)::before {
  background-image: url("/local/assets/max/max-dark.svg");
}
.footer__social .social__item--image > a.social__link[href^="https://max.ru/"]:hover {
  background: #471aff !important;
}
.footer__social .social__item--image > a.social__link[href^="https://max.ru/"]:hover::before {
  background-image: url("/local/assets/max/max-white.svg");
}
