.att-popup {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    box-sizing: border-box;
}

.att-popup.is-open {
    display: flex;
}

html.att-popup-open {
    overflow: hidden;
}

.att-popup__overlay {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.att-popup__modal {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    width: min(520px, 100%);
    max-width: 100%;
    min-width: 0;
    max-height: min(92dvh, 720px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2.125rem 2.25rem 1.75rem;
    border-radius: 8px;
    background: #2e2e2e;
    color: #fff;
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.45);
    font-family: 'Montserrat', sans-serif;
}

.att-popup__close {
    position: absolute;
    top: 1.125rem;
    right: 1.125rem;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0.75;
    cursor: pointer;
}

.att-popup__close:hover,
.att-popup__close:focus-visible {
    opacity: 1;
}

.att-popup__close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
}

.att-popup__close::before,
.att-popup__close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #fff;
}

.att-popup__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.att-popup__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.att-popup__title {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4vw, 2.625rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.1;
    overflow-wrap: break-word;
}

.att-popup__text {
    font-size: 0.9375rem;
    line-height: 1.35;
    opacity: 0.9;
    overflow-wrap: break-word;
}

.att-popup__text p {
    margin: 0 0 0.625rem;
}

.att-popup__text p:last-child {
    margin-bottom: 0;
}

.att-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.25rem;
    min-width: 0;
    width: 100%;
}

.att-popup__btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    padding: 0 1.125rem;
    border-radius: 24px;
    background: #dacfbe;
    color: #323232;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(44, 62, 78, 0.12);
}

.att-popup__btn:hover,
.att-popup__btn:focus-visible {
    background: #cdbda8;
    color: #323232;
}

.att-popup__btn--telegram {
    background: #229ed9;
    color: #fff;
    box-shadow: 0 10px 30px rgba(34, 158, 217, 0.25);
}

.att-popup__btn--telegram:hover,
.att-popup__btn--telegram:focus-visible {
    background: #1f8fc7;
    color: #fff;
}

.att-popup__btn-ico {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.att-popup__btn-ico svg {
    display: block;
}

@media (max-width: 880px) {
    .att-popup__modal {
        padding: 1.625rem 1.25rem 1.25rem;
    }

    .att-popup__actions {
        flex-direction: column;
    }

    .att-popup__btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .att-popup__btn:hover,
    .att-popup__btn:focus-visible {
        filter: none;
    }
}
