
/* ========================== Попапы акций =========================== */
/* Оверлей для попапов с акциями */
.salesCardsPopupWrapper {
    width: 100%;
    height: 100dvh;
    background: rgba(43, 16, 1, 0.9);

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    display: flex;
    justify-content: center;
    overscroll-behavior: none;
}

/* запас для старых браузеров */
@supports not (height: 100dvh) {
    .salesCardsPopupWrapper {
        height: 100vh;
    }
}

/*Попап с общинными акциями*/
.salesCardsPopupTeamWrapper {
    height: 100%;
    width: 100%;
    padding: 55px 0 20px;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;

    .salesCardsPopupHeader {
        width: 410px;
        margin: 0 auto 20px;
        position: relative;
    }
    .salesCardsPopupCloseButton {
        width: 56px;
        height: 56px;
        top: -30px;
        right: -30px;
    }
    .salesCardsPopupTitle {
        font-size: 42px;
        letter-spacing: -1px;
        color: #FFB710;
        text-align: center;
        -webkit-text-stroke: 1.5px #891906;
    }
    .salesCardsPopupContentWrapper {
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }
    @media(max-width: 500px) {
        .salesCardsPopupHeader {
            position: static;
            width: 100%;
        }
        .salesCardsPopupCloseButton {
            top: 5px;
            right: 5px;
        }
    }
    @media(max-width: 420px) {
        .salesCardsPopupTitle {
            font-size: calc(28px + (42 - 28) * ((100vw - 320px) / (420 - 320)));
        }
    }
}

/*Попап с общинными акциями*/
.salesCardsPopupSamobrankaWrapper {
    width: 100%;
    padding: 65px 5px 20px;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    position: relative;

    .salesCardsPopupHeader {
        max-width: 410px;
        width: 100%;
        margin: 0 auto 120px;
        position: relative;
        text-align: center;
    }
    .salesCardsPopupCloseButton {
        width: 56px;
        height: 56px;
        top: -30px;
        right: -50px;
    }
    @media(max-width: 500px) {
        .salesCardsPopupHeader {
            position: static;
        }
        .salesCardsPopupCloseButton {
            top: 5px;
            right: 0;
        }
    }
    .salesCardsPopupTitle {
        font-size: 40px;
        letter-spacing: -1px;
        color: #FFB710;
        text-align: center;
        -webkit-text-stroke: 1.5px #891906;
        margin-bottom: 5px;
    }
    .salesCardsPopupSubTitle {
        font-size: 17px;
        letter-spacing: -1px;
        color: #FFF4B8;
        text-align: center;
        -webkit-text-stroke: 0.64px #57010B;
        margin-bottom: 10px;
    }
    .salesCardsPopupDescriptionWrapper {
        height: 50px;
        background-color: #4D1C00;
        border-radius: 10px;

        display: flex;
        align-items: center;
        justify-content: center;

        .salesCardsPopupDescriptionText {
            font-size: 17px;
            color: #FEF5C1;
        }
    }

    .SamobrankaContentWrapper {
        height: 560px;
        width: 400px;
        margin: 0 auto;

        position: relative;

        background: url("./img/popup_samobranka_BG_busters.d12518c50da5.png") no-repeat center center;
        background-size: 100% 100%;

        .SamobrankaContentRow {
            height: 161px;
            margin: 20px 0 35px;

            display: flex;
            justify-content: space-between;
        }
        .SamobrankaContentRow:nth-child(1) .SamobrankaButton {
            margin-top: 17px;
        }
        .SamobrankaContentRow:nth-child(2) .SamobrankaButton {
            margin-top: 15px;
        }
        .SamobrankaContentRow:nth-child(3) .SamobrankaButton {
            margin-top: 13px;
        }
        .SamobrankaContentColl {
            height: 149px;
            width: 180px;
            margin: 0 5px;
            border-radius: 20px;
            position: relative;
            /*background-color: rgba(255, 165, 0, 0.72);*/
        }
        .SamobrankaBoosters {
            width: 167px;
            height: 85px;
            margin: 5px auto 4px;
        }
        .SamobrankaButton {
            width: 140px;
            height: 39px;
            margin: 0 auto;
            border-radius: 10px;

            font-size: 24px;
            letter-spacing: -1px;
            color: #FFF5BC;
            text-align: center;
            -webkit-text-stroke: 1.02px #466300;

            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2px;
            position: relative;

            cursor: pointer;
        }
        .samobrankaButtonText {
            font-size: 16px;
            margin-left: -10px;
        }
        .lockIcon {
            width: 25px;
            height: 28px;
            position: absolute;
            right: 7px;
            bottom: 4px;

            img {
                width: 100%;
            }
        }
        @media(max-width: 410px) {
            .SamobrankaContentColl {
                width: 43%;
            }
            .SamobrankaBoosters {
                max-width: max-content;
            }
            .SamobrankaButton {
                width: 90%;
            }
        }
        @media(max-width: 370px) {
            .SamobrankaButton {
                font-size: 21px;
            }
            .samobrankaButtonText {
                font-size: 14px;
            }
        }
    }
    .SamobrankaContentWrapper:before {
        content: '';
        height: 165px;

        background: url("./img/popup_samobranka_BG.f7b1a7126cd8.png") no-repeat center center;
        background-size: 100% 100%;

        position: absolute;
        top: -95px;
        left: 0;
        right: 0;
        z-index: -1;
    }

    @media(max-width: 410px) {
        .SamobrankaContentWrapper {
            width: 100%;
        }
    }
    @media(max-width: 370px) {
        .SamobrankaContentWrapper:before {
            height: 150px;
        }
    }



    /* Блок с Бустерами для Попапа самобранки  */
    .parent {
        width: 167px;
        height: 90px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;

        /* Общие стили дочерних блоков: центрирование содержимого */
        .child {
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 16px;
            margin: 1px;
            img {
                width: 100%;
            }
        }

        /* 1 блок */
        &:has(> .child:only-child) > .child {
            width: 80px;
        }

        /* 2 или 3 блока: горизонтально */
        &:has(> .child:first-child:nth-last-child(2)),
        &:has(> .child:first-child:nth-last-child(3)) {
            flex-direction: row;
            flex-wrap: nowrap;
        }

        /* 2 блока горизонтально */
        &:has(> .child:first-child:nth-last-child(2)) > .child {
            width: 60px;
            margin-right: 5px;

            .boosterCountsCommon {
                font-size: 21px;
                -webkit-text-stroke-width: 1.2px;
            }
        }
        /* 3 блока горизонтально */
        &:has(> .child:first-child:nth-last-child(3)) > .child {
            width: 50px;

            .boosterCountsCommon {
                font-size: 21px;
                -webkit-text-stroke-width: 1.2px;
            }
        }

        /* 4 блока: 2 строки */
        &:has(> .child:first-child:nth-last-child(4)) {
            display: grid;
            grid-template-columns: repeat(2, 55px);
            grid-template-rows: repeat(2, 38px);
            padding-top: 3px;
        }

        &:has(> .child:first-child:nth-last-child(4)) > .child {
            width: 45px;
            justify-self: center;

            .boosterCountsCommon {
                font-size: 18px;
                -webkit-text-stroke: 1.14px #891906;
            }
        }

        .booster {
            height: 100%;
            width: 100%;

            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;

            .boosterCountsCommon {
                color: #FFF5BC;
                letter-spacing: 0;
                position: absolute;
                bottom: 0;
                left: 50%;
                transform: translateX(-50%);

                font-size: 32.93px;
                -webkit-text-stroke: 1.55px #891906;
            }
        }

    }
    @media(max-width: 410px) {
        .parent {
            width: 100%;
        }
    }
    @media(max-width: 370px) {
        .parent {
            &:has(> .child:first-child:nth-last-child(3)) > .child {
                width: 43px;

                .boosterCountsCommon {
                    font-size: 18px;
                }
            }
        }
    }

}
