
/* ========================== Попапы акций =========================== */
/* Оверлей для попапов с акциями */
.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 29px;
        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: 600px;
        width: 400px;
        margin: 0 auto;
        padding-top: 70px;

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

        .SamobrankaContentRow {
            height: 161px;
            margin: 17px 0;

            display: flex;
            justify-content: space-between;
        }
        .SamobrankaContentColl {
            height: 155px;
            width: 180px;
            margin: 0 5px;
            border-radius: 20px;
            position: relative;
        }
        .SamobrankaBoosters {
            width: 167px;
            height: 90px;
            margin: 0 auto 4px;
        }
        .SamobrankaButton {
            width: 140px;
            height: 39px;
            margin: 0 auto;
            border-radius: 10px;

            font-size: 19px;
            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;
        }
        .lockIcon {
            width: 25px;
            height: 28px;
            position: absolute;
            right: 1px;
            bottom: 4px;

            img {
                width: 100%;
            }
        }
        @media(max-width: 410px) {
            .SamobrankaContentColl {
                width: 43%;
            }
            .SamobrankaBoosters {
                max-width: max-content;
            }
            .SamobrankaButton {
                width: 90%;
            }
        }
    }

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



    /* Блок с Бустерами для Попапа самобранки  */
    .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;
        }

        /* 1 блок: на всю ширину и высоту */
        &:has(> .child:only-child) > .child {
            width: 86px;
            height: 75px;
        }

        /* 2 или 3 блока: горизонтально, равная ширина, полная высота */
        &:has(> .child:first-child:nth-last-child(2)),
        &:has(> .child:first-child:nth-last-child(3)) {
            flex-direction: row;
            flex-wrap: nowrap;
            gap: 2px;  /* было 4px */
            padding: 2px;  /* было 4px */
        }

        &:has(> .child:first-child:nth-last-child(2)) > .child {
            width: calc(45% - 1px);
            height: 70px;

            .boosterCountsCommon {
                font-size: 23px;
            }
        }
        &:has(> .child:first-child:nth-last-child(3)) > .child {
            flex: 1;
            width: 54px;

            .boosterCountsCommon {
                font-size: 20px;
                -webkit-text-stroke: 1.42px #891906;
            }
        }

        /* 4 блока: 2 строки, равная ширина и высота */
        &:has(> .child:first-child:nth-last-child(4)) {
            gap: 2px;
            padding: 2px;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
        }

        &:has(> .child:first-child:nth-last-child(4)) > .child {
            width: calc(35% - 1px);
            flex: 0 0 auto;
            height: calc(50% - 1px);

            .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%;

            &:has(> .child:first-child:nth-last-child(3)) {
                transform: scale(0.8);
                margin: 0 -5px;
            }
            &:has(> .child:first-child:nth-last-child(4)) {
                margin: 0 -5px;
            }
        }
    }

}
