/* SN-MAX-NATIVE-20261021-V1 */

/*
 * Preserve original:
 * - anchor and its classes
 * - SVG/use hierarchy
 * - parent containers
 * - width/height
 * - responsive layout
 * - links and existing JS
 *
 * Replace visual artwork only.
 */

/* Existing native SVG icons */

a[href*="max.ru"] svg.icon-max {
    background-image:
        url("/local/templates/vpl_template/img/social/max-default.svg") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* Hide old symbol artwork, retain the original SVG/use structure */

a[href*="max.ru"] svg.icon-max > use {
    display: none !important;
}

/* Hover: use supplied colored icon */

@media (hover: hover) {
    a[href*="max.ru"]:hover svg.icon-max {
        background-image:
            url("/local/templates/vpl_template/img/social/max-hover.svg") !important;
    }
}

/* Keyboard navigation */

a[href*="max.ru"]:focus-visible svg.icon-max {
    background-image:
        url("/local/templates/vpl_template/img/social/max-hover.svg") !important;
}

/* Existing report images: preserve native IMG element */

a[href*="max.ru"] img[src*="/MAX.svg" i] {
    content:
        url("/local/templates/vpl_template/img/social/max-default.svg") !important;
    object-fit: contain;
}

/* Report image hover */

@media (hover: hover) {
    a[href*="max.ru"]:hover img[src*="/MAX.svg" i] {
        content:
            url("/local/templates/vpl_template/img/social/max-hover.svg") !important;
    }
}

a[href*="max.ru"]:focus-visible img[src*="/MAX.svg" i] {
    content:
        url("/local/templates/vpl_template/img/social/max-hover.svg") !important;
}

/* SN-MAX-BG-ALIGN-20261021-V2
   MAX ONLY. Preserve dimensions and original HTML structure.
*/

a[href*="max.ru"].header__contacts-soc-item.icon-max,
a[href*="max.ru"].mp-review__info-item-links-item.icon-max,
a[href*="max.ru"].footer__contacts-social-item.max,
a[href*="max.ru"].contacts-social__item.sn-max-added {
    background: linear-gradient(135deg, #6757F5, #3887F0) !important;
    border-color: #516CF4 !important;
    color: #FFFFFF !important;
}

/* Colored MAX artwork on a white hover background */

@media (hover: hover) {
    a[href*="max.ru"].header__contacts-soc-item.icon-max:hover,
    a[href*="max.ru"].mp-review__info-item-links-item.icon-max:hover,
    a[href*="max.ru"].footer__contacts-social-item.max:hover,
    a[href*="max.ru"].contacts-social__item.sn-max-added:hover {
        background: #FFFFFF !important;
        border-color: #516CF4 !important;
        color: #516CF4 !important;
    }
}

/* Keyboard accessibility */

a[href*="max.ru"].header__contacts-soc-item.icon-max:focus-visible,
a[href*="max.ru"].mp-review__info-item-links-item.icon-max:focus-visible,
a[href*="max.ru"].footer__contacts-social-item.max:focus-visible,
a[href*="max.ru"].contacts-social__item.sn-max-added:focus-visible {
    background: #FFFFFF !important;
    border-color: #516CF4 !important;
    color: #516CF4 !important;
}

/* SN-MAX-REPORT-BG-20261021-V3 */

/* Only MAX inside report subscription blocks */
a.report-socials__link[href*="max.ru"] {
    background: linear-gradient(
        135deg,
        #6757F5 0%,
        #3887F0 100%
    ) !important;
    border-color: #516CF4 !important;
}

@media (hover: hover) {
    a.report-socials__link[href*="max.ru"]:hover {
        background: #FFFFFF !important;
        border-color: #516CF4 !important;
    }
}

a.report-socials__link[href*="max.ru"]:focus-visible {
    background: #FFFFFF !important;
    border-color: #516CF4 !important;
}
