html.slp-popup-open,
html.slp-popup-open body {
    overflow: hidden;
}

.slp-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.slp-popup.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.slp-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.slp-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 720px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    transform: translateY(14px) scale(0.985);
    transition: transform 180ms ease;
}

.slp-popup.is-visible .slp-popup__dialog {
    transform: translateY(0) scale(1);
}

.slp-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
}

.slp-popup__close:hover {
    transform: scale(1.05);
}

.slp-popup__close:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.slp-popup__media {
    line-height: 0;
}

.slp-popup__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 62vh;
    object-fit: cover;
}

.slp-popup__content {
    padding: 30px 34px 34px;
    color: #222;
    font-size: 17px;
    line-height: 1.6;
}

.slp-popup__content > :first-child {
    margin-top: 0;
}

.slp-popup__content > :last-child {
    margin-bottom: 0;
}

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

    .slp-popup__dialog {
        max-height: calc(100vh - 28px);
        border-radius: 11px;
    }

    .slp-popup__content {
        padding: 24px 22px 26px;
        font-size: 16px;
    }

    .slp-popup__close {
        top: 8px;
        right: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slp-popup,
    .slp-popup__dialog,
    .slp-popup__close {
        transition: none;
    }
}
