html.popup-scroll-locked,
body.popup-scroll-locked {
    overflow: hidden;
}

.popup[aria-hidden="true"] {
    display: none !important;
    pointer-events: none;
}

.popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: clamp(18px, 4vw, 48px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 38%, rgba(99, 50, 128, .18), transparent 46%),
        rgba(5, 4, 9, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: popupBackdropIn .45s ease both;
}

.popup__overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.popup__content {
    --popup-border-angle: 0deg;
    position: relative;
    z-index: 1;
    width: min(920px, calc(100vw - 40px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
    color: #fff;
    background: rgba(14, 12, 18, .94);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    box-shadow: 0 32px 90px rgba(0,0,0,.55);
    animation: popupReveal .65s cubic-bezier(.2,.8,.2,1) both;
}

.popup__content::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 9;
    padding: 2px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(
        from var(--popup-border-angle),
        transparent 0deg,
        transparent 245deg,
        rgba(255, 255, 255, .18) 272deg,
        rgba(255, 255, 255, .95) 298deg,
        rgba(213, 216, 224, .52) 322deg,
        transparent 348deg,
        transparent 360deg
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, .38));
    animation: popupBorderRun 4.5s linear infinite;
}

.popup__image {
    position: relative;
    overflow: hidden;
    background: #08070a;
}

.popup__image img {
    display: block;
    width: 100%;
    height: min(62vh, 620px);
    object-fit: contain;
    background: #08070a;
    transform: translateZ(0) scale(1);
    will-change: transform;
}

.popup__image:not(.swiper) img,
.popup__image .swiper-slide-active img {
    animation: popupImageZoom 7s ease-out both;
}

.popup__body {
    padding: 26px clamp(24px, 5vw, 56px) 30px;
    text-align: center;
    background: linear-gradient(180deg, rgba(16,13,20,.98), rgba(8,7,11,.98));
}

.popup__title {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.3;
}

.popup__text,
.popup__text p {
    color: rgba(255,255,255,.76);
    line-height: 1.75;
}

.popup__text > :last-child {
    margin-bottom: 0;
}

.popup__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.popup__actions .btn {
    min-width: 150px;
    padding: 11px 24px;
    border: 0;
    border-radius: 999px;
    color: #3e1658;
    background: #fff;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.popup__actions .btn:hover {
    color: #fff;
    background: #7a3a98;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(65,24,87,.45);
}

.popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50%;
    color: #17121b;
    background: rgba(255,255,255,.94);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
    transition: transform .25s ease, background .25s ease;
}

.popup__close:hover {
    color: #17121b;
    background: #fff;
    transform: rotate(90deg) scale(1.06);
}

@keyframes popupBackdropIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupReveal {
    from {
        opacity: 0;
        transform: translateY(34px) scale(.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes popupImageZoom {
    from {
        transform: translateZ(0) scale(1);
    }
    to {
        transform: translateZ(0) scale(1.035);
    }
}

@property --popup-border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes popupBorderRun {
    to {
        --popup-border-angle: 360deg;
    }
}

.popup__image .swiper-pagination {
    bottom: 14px;
}

.popup__image .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,.65);
    opacity: 1;
    transition: width .25s ease, border-radius .25s ease, background .25s ease;
}

.popup__image .swiper-pagination-bullet-active {
    width: 26px;
    border-radius: 999px;
    background: #fff;
}

@media (max-width: 575px) {
    .popup {
        padding: 12px;
    }

    .popup__content {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-radius: 16px;
    }

    .popup__image img {
        height: auto;
        max-height: 62vh;
    }

    .popup__body {
        padding: 22px 18px 24px;
    }

    .popup__title {
        font-size: 23px;
    }

    .popup__close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .popup,
    .popup__content,
    .popup__content::before,
    .popup__image img {
        animation: none !important;
    }

    .popup__actions .btn,
    .popup__close {
        transition: none;
    }
}