/* ============= Глобальные цвета ============= */
:root {
    --color-gold-light: #FFF5BC;      /* используется: текст кнопки, текст бонусов */
    --color-green-dark: #466300;      /* используется: обводка текста, старая цена */
    --color-strike-red: rgba(255, 55, 0, 1);  /* зачеркивание */
    --color-sand-border: #E0AF7D;     /* рамка и тень */
    --color-sand-bg: #F8D49D;         /* фон бонусной карточки */
    --color-brown-stroke: #923B09;    /* обводка текста бонусов */
}

/* ============= Зеленая кнопка с старой ценой ============= */
.greenButton {
    background-image: url("./img/longGreen_buttonWhiteBorder.c3374546b783.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;

    width: 100%;
    height: 100%;

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

    .greenButtonText {
        margin-top: -2px;
        padding-left: 10px;
        position: relative;

        color: var(--color-gold-light);
        font-size: 26px;
        line-height: 25.2px;

        -webkit-text-stroke: 1.19px var(--color-green-dark);
        font-family: 'Domovyata', 'Verdana', sans-serif;
        font-weight: 900;
    }

    .greenButtonOldPrice {
        width: 65px;
        color: var(--color-green-dark);
        font-size: 16px;
        line-height: 100%;
        font-weight: 900;
        position: relative;
        text-decoration: none;
        text-align: center;
        white-space: nowrap
    }

    .greenButtonOldPrice::before {
        content: '';
        width: 65px;
        position: absolute;
        height: 2px;
        background-color: var(--color-strike-red);
        top: 35%;
        left: 0;
        transform: rotate(-9deg);
        border-radius: 30px;
        z-index: 5;
    }
}

/* ============= Кнопка закрытия ============= */
.closeButton {
    width: 39px;
    height: 39px;
    cursor: pointer;
    border: 0;
    margin: 0;
    padding: 0;
    display: block;
    outline: none;
    -webkit-tap-highlight-color: transparent;

    background: transparent url("img/btn_close.865f4ddac015.png") no-repeat center center ;
    background-size: cover;

    position: absolute;
    top: 7px;
    right: 8px;

    img {
        width: 100%;
    }

    .closeButton:active {
        background-color: transparent;
    }
    .closeButton:focus  {
        background-color: transparent;
    }
}

/* ============= Карточка бонусов ============= */
.salesCardBonusWrapper {
    border: 2px solid var(--color-sand-border);
    background-color: var(--color-sand-bg);
    border-radius: 10px;
    width: 100%;
    height: 89px;
    margin-right: 3px;
    padding: 2px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    -webkit-box-shadow: 0px -2px 0px 0px var(--color-sand-border);
    -moz-box-shadow: 0px -2px 0px 0px var(--color-sand-border);
    box-shadow: 0px -2px 0px 0px var(--color-sand-border);

    /* Если внутри только один .salesCardBonusRow — добавляем padding-top */
    &:has(.salesCardBonusRow:only-child) {
        padding-top: 10px;
    }

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

        display: flex;
        justify-content: space-around;
        align-items: center;
        flex-direction: row; /* по умолчанию строка */

        /* Если есть salesCardBonusTimerWrapper — делаем колонку */
        &:has(.salesCardBonusTimerWrapper) {
            flex-direction: column;
            justify-content: space-between;
        }

        /* Если есть два salesCardBonus — строка (переопределяем на случай, если оба условия) */
        &:has(.salesCardBonus):has(.salesCardBonus):not(:has(.salesCardBonusTimerWrapper)) {
            flex-direction: row;
            gap: 0;
        }

        .salesCardBonus {
            position: relative;

            .salesCardBonusCounts {
                font-size: 17.41px;
                line-height: 16.8px;

                color: var(--color-gold-light);
                -webkit-text-stroke: 1.09px var(--color-brown-stroke);

                position: absolute;
                bottom: 0;
                right: 0;
            }
        }

        .salesCardBonusTimerWrapper {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;

            .salesCardBonusTimer {
                font-size: 17.41px;
                line-height: 16.8px;

                color: var(--color-gold-light);
                -webkit-text-stroke: 1.09px var(--color-brown-stroke);
            }
        }
    }
}