body.rpc-popup-open {
    overflow: hidden;
}

.rpc-popup-overlay {
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    box-sizing: border-box;
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    padding: 24px;
    position: fixed;
    transition: opacity 180ms ease;
    z-index: 999999;
}

.rpc-popup-overlay[hidden] {
    display: none;
}

.rpc-popup-overlay.is-visible {
    opacity: 1;
}

.rpc-popup-shell {
    background: #050505;
    border-radius: 6px;
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.46);
    box-sizing: border-box;
    height: min(var(--rpc-popup-height, 600px), calc(100vh - 48px));
    max-height: calc(100vh - 48px);
    max-width: calc(100vw - 48px);
    overflow: hidden;
    position: relative;
    width: min(var(--rpc-popup-width, 800px), calc(100vw - 48px));
}

.rpc-popup-overlay .rpc-popup-close {
    align-items: center;
    appearance: none;
    background: #d71920;
    border: 0 !important;
    border-radius: 6px;
    box-shadow: none !important;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-weight: 300;
    height: 36px;
    justify-content: center;
    line-height: 1;
    max-height: 36px;
    max-width: 36px;
    outline: 0 !important;
    padding: 0;
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
    z-index: 2;
}

.rpc-popup-overlay .rpc-popup-close span {
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px !important;
    font-weight: 300;
    line-height: 30px;
    transform: translateY(-1px);
}

.rpc-popup-overlay .rpc-popup-close:hover,
.rpc-popup-overlay .rpc-popup-close:focus,
.rpc-popup-overlay .rpc-popup-close:focus-visible {
    background: #b11218;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.rpc-popup-image-wrap,
.rpc-popup-image-link {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.rpc-popup-image-link {
    cursor: pointer;
}

.rpc-popup-image-wrap img,
.rpc-popup-image-link img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.rpc-popup-button {
    background: #ffffff;
    border-radius: 4px;
    bottom: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    color: #111111;
    display: inline-flex;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    right: 36px;
    line-height: 1.2;
    max-width: calc(100% - 80px);
    min-height: 46px;
    padding: 14px 24px;
    position: absolute;
    text-align: center;
    text-decoration: none;
    z-index: 1;
}

.rpc-popup-button:hover,
.rpc-popup-button:focus-visible {
    background: #f2f2f2;
    color: #111111;
    outline: 2px solid #fff;
    outline-offset: 3px;
    text-decoration: none;
}

@media (max-width: 640px) {
    .rpc-popup-overlay {
        padding: 16px;
    }

    .rpc-popup-shell {
        height: min(var(--rpc-popup-height, 600px), calc(100vh - 32px));
        max-height: calc(100vh - 32px);
        max-width: calc(100vw - 32px);
        width: min(var(--rpc-popup-width, 800px), calc(100vw - 32px));
    }

    .rpc-popup-overlay .rpc-popup-close {
        height: 36px;
        width: 36px;
    }

    .rpc-popup-overlay .rpc-popup-close span {
        font-size: 30px !important;
        line-height: 30px;
    }

    .rpc-popup-button {
        bottom: 18px;
        font-size: 15px;
        max-width: calc(100% - 48px);
    }
}
