.gwd-popup[hidden] {
    display: none;
}

.gwd-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    box-sizing: border-box;
    animation: gwd-popup-fade-in 220ms ease-out both;
}

.gwd-popup__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 30%),
        linear-gradient(180deg, rgba(7, 10, 18, 0.64), rgba(5, 7, 12, 0.82));
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.gwd-popup__dialog {
    position: relative;
    width: min(92vw, 350px);
    line-height: 0;
    transform-origin: center;
    animation: gwd-popup-pop-in 260ms cubic-bezier(0.18, 0.85, 0.28, 1.12) both;
}

.gwd-popup__link {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 18px;
    background: #f8fafc;
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.48),
        0 12px 28px rgba(0, 0, 0, 0.28);
    outline: 0;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.gwd-popup__link::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.gwd-popup__link:hover,
.gwd-popup__link:focus {
    border-color: rgba(255, 255, 255, 0.72);
    transform: translateY(-3px);
    box-shadow:
        0 42px 100px rgba(0, 0, 0, 0.52),
        0 18px 36px rgba(0, 0, 0, 0.3);
}

.gwd-popup__link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.86);
    outline-offset: 6px;
}

.gwd-popup__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 82vh;
    object-fit: contain;
    border: 0;
    border-radius: inherit;
}

.gwd-popup__close {
    position: absolute;
    top: -16px;
    right: -16px;
    z-index: 1;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 36px;
    text-align: center;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.34),
        0 2px 8px rgba(0, 0, 0, 0.16);
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.gwd-popup__close:hover,
.gwd-popup__close:focus {
    background: #f8fafc;
    color: #000000;
    transform: translateY(-1px) scale(1.05);
    box-shadow:
        0 20px 38px rgba(0, 0, 0, 0.38),
        0 3px 10px rgba(0, 0, 0, 0.18);
}

.gwd-popup__close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.82);
    outline-offset: 4px;
}

body.gwd-popup-is-open {
    overflow: hidden;
}

@keyframes gwd-popup-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes gwd-popup-pop-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .gwd-popup {
        align-items: center;
        padding: 18px 14px;
    }

    .gwd-popup__dialog {
        width: 100%;
    }

    .gwd-popup__image {
        max-height: 78vh;
    }

    .gwd-popup__close {
        top: -12px;
        right: -8px;
        width: 36px;
        height: 36px;
        font-size: 25px;
        line-height: 33px;
    }

    .gwd-popup__link {
        border-radius: 14px;
    }
}

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