.hpip-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hpip-popup.is-visible {
    display: flex;
}

.hpip-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
}

.hpip-popup__content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    background: transparent;
    line-height: 0;
    animation: hpipFadeUp 0.28s ease-out;
}

.hpip-popup__link {
    display: block;
    line-height: 0;
    text-decoration: none;
    background: transparent;
}

.hpip-popup__image {
    display: block;
    width: 100%;
    height: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.hpip-popup__close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: linear-gradient(135deg, #ce2027 0%, #8f1116 100%);
    color: transparent;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), 0 0 0 5px rgba(206, 32, 39, 0.14);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hpip-popup__close::before,
.hpip-popup__close::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: #ffffff;
}

.hpip-popup__close::before {
    transform: rotate(45deg);
}

.hpip-popup__close::after {
    transform: rotate(-45deg);
}

.hpip-popup__close:hover,
.hpip-popup__close:focus {
    background: linear-gradient(135deg, #111111 0%, #ce2027 100%);
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42), 0 0 0 7px rgba(206, 32, 39, 0.18);
    outline: none;
}

.hpip-popup__close:active {
    transform: scale(0.96) rotate(90deg);
}

@keyframes hpipFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .hpip-popup {
        padding: 14px;
    }

    .hpip-popup__close {
        top: -14px;
        right: -14px;
        width: 38px;
        height: 38px;
    }

    .hpip-popup__close::before,
    .hpip-popup__close::after {
        width: 16px;
    }
}
