.stati-max-popup[hidden] {
    display: none !important;
}

.stati-max-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    font-family: Arial, sans-serif;
    letter-spacing: 0;
}

.stati-max-popup *,
.stati-max-popup *::before,
.stati-max-popup *::after {
    box-sizing: border-box;
}

.stati-max-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 35, 0.68);
}

.stati-max-popup__dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 38px 40px 40px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(18, 24, 35, 0.28);
    color: #161b22;
    text-align: center;
    transform: translateY(12px);
    opacity: 0;
    animation: stati-max-popup-enter 220ms ease-out forwards;
}

.stati-max-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f3f5;
    color: #20252c;
    font-size: 28px;
    line-height: 34px;
    cursor: pointer;
}

.stati-max-popup__close:hover,
.stati-max-popup__close:focus-visible {
    background: #e2e6ea;
    outline: 2px solid #6638d4;
    outline-offset: 2px;
}

.stati-max-popup__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    height: 38px;
    margin-bottom: 20px;
    padding: 0 18px;
    border-radius: 6px;
    background: #6638d4;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.stati-max-popup__title {
    margin: 0 0 14px;
    color: #161b22;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.stati-max-popup__description {
    margin: 0 auto 26px;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: 0;
}

.stati-max-popup__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: 6px;
    background: #ff0025;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    letter-spacing: 0;
}

.stati-max-popup__action:hover,
.stati-max-popup__action:focus-visible {
    background: #d90020;
    color: #fff !important;
    outline: 2px solid #161b22;
    outline-offset: 3px;
}

body.stati-max-popup-open {
    overflow: hidden;
}

@keyframes stati-max-popup-enter {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .stati-max-popup {
        align-items: flex-end;
        padding: 12px;
    }

    .stati-max-popup__dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 34px 22px 26px;
    }

    .stati-max-popup__brand {
        margin-bottom: 16px;
    }

    .stati-max-popup__title {
        padding: 0 10px;
        font-size: 23px;
    }

    .stati-max-popup__description {
        margin-bottom: 22px;
        font-size: 16px;
    }

    .stati-max-popup__action {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stati-max-popup__dialog {
        animation: none;
        transform: none;
        opacity: 1;
    }
}
