@font-face {
    font-family: 'Widget Font';
    src: url("SFProDisplay-Regular.woff2") format('woff2'),
    url("SFProDisplay-Regular.woff") format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Widget Font';
    src: url("SFProDisplay-Medium.woff2") format('woff2'),
    url("SFProDisplay-Medium.woff") format('woff');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Widget Font';
    src: url("SFProDisplay-Semibold.woff2") format('woff2'),
    url("SFProDisplay-Semibold.woff") format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Widget Font';
    src: url("SFProDisplay-Bold.woff2") format('woff2'),
    url("SFProDisplay-Bold.woff") format('woff');
    font-weight: 700;
    font-style: normal;
}

/* reset */
.fpsmart div {
    background: transparent;
}

/* Banner (desktop) */
@media screen and (min-width: 700px) {

    html .fpsmart__bn {
        position: fixed;
        z-index: 999999;
        bottom: 10px;
        left: 0;
        right: 0;
        transform: translateY(100px);
        width: 696px;
        padding: 12px 140px 12px 12px;
        border-radius: 14px;
        height: 103px;
        background: #444243 url("background-banner-desktop.jpg") center/cover no-repeat;
        color: #fff;
        box-shadow: 0 0 50px 0 rgba(0, 0, 0, .3);
        margin: auto;
        display: flex;
        box-sizing: border-box;
        text-decoration: none;
        opacity: 0;
        touch-action: none;
        transition: transform 200ms, opacity 200ms;
    }

    /* Отображаем баннер, если не открыт qr */
    html[data-fpstate="visibled"] .fpsmart:not(.fpsmart--qr) .fpsmart__bn {
        transform: translateY(0);
        opacity: 1;
        touch-action: auto;
    }

    html .fpsmart__close {
        position: absolute;
        cursor: pointer;
        top: 5px;
        right: 5px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    html .fpsmart__close .fpsmart__svg {
        width: 16px;
        height: 16px;
        fill: #A7A7A7;
        transition: fill 0.2s ease;
    }

    html .fpsmart__close:hover .fpsmart__svg {
        fill: #fff;
    }

    html .fpsmart__logo {
        position: absolute;
        top: 16px;
        right: 64px;
        width: 51px;
        height: 51px;
        border-radius: 9px;
        transform: rotate(-17deg);
        box-shadow: 4px 4px 37px -29px rgba(255, 255, 255, 0.36);
        transition: box-shadow 1s ease;
    }

    html .fpsmart__bn:hover .fpsmart__logo {
        box-shadow: 4px 4px 37px 20px rgba(255, 255, 255, 0.36);
    }

    html .fpsmart__label {
        position: absolute;
        text-align: center;
        font: 400 11px/11px "Widget Font", sans-serif;
        top: 70px;
        right: 36px;
        width: 80px;
        height: 22px;
        overflow: hidden;
        text-overflow: ellipsis;
        transform: rotate(-17deg);
        white-space: pre-wrap;
        color: #fff;
    }

    html .fpsmart__content {
        margin: 7px 0 0 14px;
        display: flex;
        flex-direction: column;
    }

    html .fpsmart__title {
        font: 800 17px/20px 'Widget Font', sans-serif;
        height: 20px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 530px;
    }

    html .fpsmart__text {
        margin: 6px 0 0 0;
        font: 500 17px/21px 'Widget Font', sans-serif;
        color: #BABABA;
        overflow: hidden;
        max-height: 44px;
        width: 400px;
        white-space: pre-wrap;
    }

    html .fpsmart__title br {
        display: none;
    }
}

/* Banner (mobile) */
@media screen and (max-width: 700px) {
    html .fpsmart__bn {
        position: fixed;
        z-index: 99999;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-radius: 14px;
        transform: translateY(100px);
        opacity: 0;
        touch-action: none;
        box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
        padding: 14px 18px;
        background: #444243 url("background-banner-mobile.jpg") center right/700px 103px no-repeat;
        display: flex;
        box-sizing: border-box;
        color: #fff;
        transition: transform 200ms, opacity 200ms;
        text-decoration: none;
    }

    html .fpsmart--top .fpsmart__bn {
        /*top: auto;*/
        /*bottom: 10px;*/
    }

    html[data-fpstate="visibled"] .fpsmart__bn {
        transform: translateY(0);
        opacity: 1;
        touch-action: auto;
    }

    html .fpsmart__logo {
        position: absolute;
        top: 25px;
        right: 48px;
        width: 43px;
        height: 43px;
        border-radius: 9px;
        transform: rotate(-17deg);
    }

    html .fpsmart__label {
        position: absolute;
        text-align: center;
        font: 400 10px/11px "Widget Font", sans-serif;
        top: 72px;
        right: 25px;
        width: 63px;
        height: 22px;
        overflow: hidden;
        text-overflow: ellipsis;
        transform: rotate(-17deg);
        white-space: pre-wrap;
        color: #fff;
    }

    html .fpsmart__content {
        width: 100%;
        padding: 0 86px 0 0;
    }

    html .fpsmart__title {
        font: 800 16px/18px 'Widget Font', sans-serif;
        height: 36px;
        overflow: hidden;
    }

    html .fpsmart__text {
        font: 500 14px/16px 'Widget Font', sans-serif;
        color: #C8C8C8;
        margin: 7px 0 0 0;
        height: 32px;
        overflow: hidden;
    }

    html .fpsmart__close {
        position: absolute;
        cursor: pointer;
        top: 5px;
        right: 5px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    html .fpsmart__close .fpsmart__svg {
        width: 16px;
        height: 16px;
        fill: #A7A7A7;
        transition: fill 0.2s ease;
    }

    html .fpsmart__close:active .fpsmart__svg {
        fill: #fff;
    }

    @media screen and (max-width: 420px) {
        html .fpsmart__text br {
            display: none;
        }
    }

}

/* Buttons (only desktop) */
@media screen {

    html .fpsmart__buttons {
        position: fixed;
        z-index: 999999;
        transform: translate(-100%, -50%);
        opacity: 0;
        transition-delay: 400ms;
        top: 50%;
        left: 0;
        margin: auto;
        background-color: rgba(0, 0, 0, .78);
        border-radius: 0 12px 12px 0;
        cursor: pointer;
        padding: 18px 17px 18px 20px;
        transition: transform 200ms, opacity 200ms;
    }

    html .fpsmart--right .fpsmart__buttons {
        left: auto;
        right: 0;
        transform: translate(100%, -50%);
        border-radius: 12px 0 0 12px;
        padding: 18px 20px 18px 17px;
        display: none;
    }

    /* Отображаем кнопки, если свёрнут баннер и не отображается qr */
    html[data-fpstate="hidden"] .fpsmart:not(.fpsmart--qr) .fpsmart__buttons {
        transform: translate(0, -50%);
        opacity: 1;
        display: block;
    }

    html .fpsmart__button {
        margin: 13px 0 0 0;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid #969696;
        transition: background-color .2s ease, border-color .2s ease;
        color: #969696;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
    }

    html .fpsmart__button:first-child {
        margin: 0;
    }

    @media screen and (min-width: 475px) {

        html .fpsmart__button:hover {
            border-color: #fff;
            background-color: #fff;
            color: #363333;
        }
    }

}

@media screen and (max-width: 475px) {
    html[data-fpstate="hidden"] .fpsmart:not(.fpsmart--qr) .fpsmart__buttons {
        padding: 4px;
    }

    html .fpsmart__button {
        margin: 4px 0 0 0;
    }
}


/* QR (only desktop) */
@media screen and (min-width: 475px) {

    html .fpsmart__qr {
        width: 696px;
        border-radius: 14px;
        background: #fff url("background-qr.jpg") bottom right/auto no-repeat;
        padding: 37px 42px;
        box-shadow: 0 0 50px 0 rgba(0, 0, 0, .3);
        transform: scale(0);
        box-sizing: border-box;
        /*position: absolute;*/
        position: fixed;
    }

    html .fpsmart__qr .fpsmart__logo {
        top: auto;
        right: 256px;
        bottom: 194px;
        width: 60px;
        height: 60px;
        border-radius: 13px;
        transform: rotate(-15deg);
    }

    html .fpsmart__qr .fpsmart__label {
        top: auto;
        right: 223px;
        bottom: 159px;
        font: 400 11px/13px "Widget Font", sans-serif;
        width: 100px;
        height: 31px;
        transform: rotate(-15deg);
    }

    html .fpsmart--qr {
        position: fixed;
        z-index: 999999;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Фоновая заливка */
    html .fpsmart--qr:before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, .8);
    }

    html .fpsmart__qr-close {
        position: absolute;
        background: url("close.svg") no-repeat 50%;
        width: 50px;
        height: 50px;
        top: 19px;
        right: 19px;
        cursor: pointer;
        opacity: .2;
        transition: opacity 200ms;
    }

    html .fpsmart__qr-close:hover {
        opacity: .8;
    }

    html .fpsmart--qr > .fpsmart__qr {
        transform: scale(1);
        transition: transform 300ms;
    }

    html .fpsmart__qr-thanks {
        padding: 0 10px;
        font: 600 18px/22px 'Widget Font', sans-serif;
        display: flex;
        justify-content: center;
        align-items: center;
        min-width: 164px;
        height: 45px;
        color: #fff;
        cursor: pointer;
        transition: opacity 0.3s;
        background: #000000;
        border: none;
        border-radius: 6px;
        margin: 44px 0 0 0;
    }

    html .fpsmart__qr-thanks:hover {
        opacity: 0.7;
    }

    html .fpsmart__caption {
        font: 800 22px/26px 'Widget Font', sans-serif;
        color: #0B0B0B;
        height: 55px;
        overflow: hidden;
        width: 400px;
        white-space: pre-wrap;
        text-wrap: balance;
    }

    html .fpsmart__caption-sub {
        font: 500 22px/26px 'Widget Font', sans-serif;
        color: #4D4D4D;
        margin: 7px 0 0 0;
        white-space: pre-wrap;
        /*height: 55px;*/
        max-height: 130px;
        width: 350px;
        overflow: hidden;
        text-wrap: balance;
    }

    html .fpsmart__cont {
        display: flex;
        margin: 38px 0 0 0;
    }

    html .fpsmart__image-wrap {
        width: 164px;
        height: 164px;
        overflow: hidden;
    }

    html .fpsmart__image {
        height: 204px;
        width: 204px;
        margin: -20px;
        max-width: initial;
    }

    html .fpsmart__app-wrap {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 8px 32px;
    }

    html  .fpsmart__app-wrap .fpsmart__button,
    html  .fpsmart__app-wrap .fpsmart__button:first-child {
        margin: 8px 0;
    }

    html  .fpsmart__app-wrap .fpsmart__button:hover {
        border-color: #363333;
        background-color: #363333;
        color: #fff;
    }

    /* Если высота экрана маленькая, отображаем только самое необходимое */
    @media screen and (max-height: 480px) {

        html .fpsmart__caption-sub {
            display: none;
        }

    }


}


/* QR (mobile) */
@media screen and (max-width: 474px) {
    html .fpsmart__qr {
        display: none;
    }
}


/* Если стоит флаг скрывать на сессию, то не сворачиваем баннер, а скрываем полностью */
html[data-fpstate="hidden"] .fpsmart--hide-during-session {
    display: none;
}

/* Не отображаем в десктопе, если стоит такой флаг */
@media screen and (min-width: 475px) {
    html .fpsmart--hide-desktop {
        display: none;
    }
}

/*html .svg {*/
/*    display: none;*/
/*}*/
