/*
repo: olalib
path: public/new_year/theme.css
*/

body.new-year > header,
body.new-year > footer{
    isolation: isolate;
}

body.new-year > header::before,
body.new-year > footer::before,
body.new-year > footer::after{
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
}

body.new-year > header > div,
body.new-year > footer > div{
    position: relative;
    z-index: 1;
}

/* На широких экранах ветка занимает свободное поле справа и не меняет размеры шапки. */
body.new-year > header::before{
    top: 0;
    right: 0;
    display: none;
    width: 120px;
    height: 120px;
    background-image: url('/new_year/branches.png');
    transform: scaleX(-1);
    filter: drop-shadow(0 3px 5px rgb(30 34 53 / 18%));
}

body.new-year header [data-header-band]{
    position: relative;
    z-index: 0;
    height: 26px;
    background-image: url('/brand/patterns/diamonds-red-on-linen.svg') !important;
}

body.new-year > footer{
    position: relative;
    overflow: hidden;
}

body.new-year > footer::before{
    top: 0;
    left: 0;
    z-index: 2;
    display: none;
    width: 190px;
    height: 190px;
    background-image: url('/new_year/branches.png');
    filter: drop-shadow(0 3px 6px rgb(0 0 0 / 25%));
}

body.new-year > footer::after{
    top: 58px;
    right: 14px;
    width: 36px;
    height: 39px;
    background-image: url('/new_year/bauble-red.png');
    filter: drop-shadow(0 4px 6px rgb(0 0 0 / 28%));
}

body.new-year footer [data-footer-band]{
    height: 44px;
    background-image: url('/brand/patterns/diamonds-red-on-ink.svg') !important;
}

body.new-year .snow .snow__flake{
    color: #9FBFD6;
}

body.new-year .ny-filial-icon{
    width: 42px;
    height: 42px;
    transform-origin: 50% 8%;
    filter: drop-shadow(0 2px 2px rgb(30 34 53 / 12%));
}

body.new-year h2 > .ny-filial-icon{
    width: 48px;
    height: 48px;
}

body.new-year h2:has(> .ny-filial-icon) + div.pl-11{
    padding-left: 60px;
}

body.new-year a:hover > .ny-filial-icon,
body.new-year a:focus-visible > .ny-filial-icon,
body.new-year li:hover .ny-filial-icon,
body.new-year li:focus-within .ny-filial-icon,
body.new-year h2:hover > .ny-filial-icon,
body.new-year h2:focus-within > .ny-filial-icon,
body.new-year li:hover .ny-quick-icon,
body.new-year li:focus-within .ny-quick-icon{
    animation: ny-decoration-swing 900ms ease-in-out;
}

body.new-year .ny-quick-icon{
    transform-origin: 50% 20%;
}

@keyframes ny-decoration-swing{
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(8deg); }
    45% { transform: rotate(-6deg); }
    70% { transform: rotate(3deg); }
}

@media (min-width: 640px){
    body.new-year > footer::after{
        top: 64px;
        width: 46px;
        height: 50px;
    }
}

@media (min-width: 1280px){
    body.new-year > header::before,
    body.new-year > footer::before{
        display: block;
    }
}

@media (prefers-reduced-motion: reduce){
    body.new-year .snow{
        display: none;
    }

    body.new-year .ny-filial-icon,
    body.new-year .ny-quick-icon,
    body.new-year a:hover > .ny-filial-icon,
    body.new-year a:focus-visible > .ny-filial-icon,
    body.new-year li:hover .ny-filial-icon,
    body.new-year li:focus-within .ny-filial-icon,
    body.new-year h2:hover > .ny-filial-icon,
    body.new-year h2:focus-within > .ny-filial-icon,
    body.new-year li:hover .ny-quick-icon,
    body.new-year li:focus-within .ny-quick-icon{
        animation: none;
        transition: none;
    }
}
