/* Затемнение страницы */

.spp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Окно */

.spp-popup,
.spp-popup * {
    box-sizing: border-box;
}

.spp-popup {
    position: relative;
    width: calc(100% - 32px);
    max-width: 870px;
    max-height: calc(100dvh - 32px);
    margin: 16px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #fff;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

/* Две колонки */

.spp-content {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 43% 57%;
    min-height: 440px;
    margin: 0;
    padding: 0;
    background: #fff;
}

/* Левая колонка */

.sp-name {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 26px;
    background: #172635;
    overflow: visible;
}

/* Фон с рукой, выступающей на белую часть */

.sp-name::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: auto;
    aspect-ratio: 1672 / 941;

    background-image:
        url("https://rudota2.ru/wp-content/uploads/pudge4popup.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;

    transform: translateX(42%);
    z-index: 4;
    pointer-events: none;
}

/* Логотип поверх картинки */

.spp-popup .sp-name img {
    position: relative;
    z-index: 5;
    display: block;
    width: auto;
    max-width: min(160px, 100%);
    height: auto;
    max-height: 50px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .5));
}

/* Правая колонка */

.sp-promo {
    position: relative;
    z-index: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 58px 36px 42px 64px;
    background: #fff;
}

/* Содержимое выше слоя изображения */

.sp-promo > * {
    position: relative;
    z-index: 3;
}

/* Заголовок */

.sp-label {
    margin: 0 0 20px;
    padding: 0;
    color: #172131;
    font-family: "Reaver", sans-serif;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
}

/* Поле промокода */

.sp-code {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 17px 12px;
    border: 1px dashed #aabbd0;
    border-radius: 10px;
    background: #f3f6fa;
    color: #172131;

    font-family: "Reaver", sans-serif;
    font-size: 52px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 1px;
    text-align: center;
    overflow-wrap: anywhere;

    cursor: pointer;
    -webkit-user-select: all;
    user-select: all;
    transition: background .2s;
}

.sp-code:hover {
    background: #eaf0f8;
}

.sp-code::selection {
    background: #0075ff;
    color: #fff;
}

/* Описание */

.sp-text {
    max-width: 100%;
    margin: 22px 0 28px;
    padding: 0;
    color: #687384;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}

.sp-text strong {
    color: #303c4d;
    font-weight: 600;
}

/* Кнопка */

.sp-link {
    width: 100%;
    margin: 0;
    padding: 0;
}

.sp-link a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 80%;
    min-height: 50px;
    margin: 0 auto;
    padding: 13px 20px;
    border: 0;
    border-radius: 9px;
    text-transform: uppercase;
    background: #e51313;
    color: #fff !important;
    box-shadow: 0 5px 16px rgba(0, 117, 255, .18);

    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none !important;

    transition: background .2s, box-shadow .2s;
}

.sp-link a:hover {
    background: #c00b0b;
    box-shadow: 0 7px 22px rgba(0, 117, 255, .25);
}

.sp-link a:focus-visible {
    outline: 3px solid #172131;
    outline-offset: 3px;
}

/* Крестик закрытия */

.spp-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;

    background: #eef1f5;
    color: #596474;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;

    transition: background .2s, color .2s;
}

.spp-close:hover {
    background: #e1e6ed;
    color: #172131;
}

/* Мобильная версия */

@media (max-width: 600px) {
    .spp-popup {
        width: calc(100% - 24px);
        max-height: calc(100dvh - 24px);
        margin: 12px;
        border-radius: 12px;
    }

    .spp-content {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .sp-name {
        min-height: 155px;
        padding: 22px 24px;
        overflow: hidden;

        background-color: #172635;
        background-image:
            url("https://rudota2.ru/wp-content/uploads/pudge4popup.png");
        background-size: auto 260%;
        background-position: left 30%;
        background-repeat: no-repeat;
    }

    .sp-name::before {
        content: none;
    }

    .spp-popup .sp-name img {
        max-width: min(140px, calc(100% - 44px));
        max-height: 40px;
    }

    .sp-promo {
        padding: 28px 24px;
    }

    .sp-label {
        margin-bottom: 16px;
        font-size: 30px;
    }

    .sp-code {
        min-width: 0;
        padding: 14px 10px;
        font-size: 42px;
    }

    .sp-text {
        margin: 18px 0 24px;
        font-size: 14px;
        line-height: 1.4;
    }

    .sp-link a {
        font-size: 16px;
    }

    .spp-close {
        background: #fff;
    }
}