/* ── Overlay ────────────────────────────────────────────── */
.pip-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    padding: 16px;
    box-sizing: border-box;
    transition: background 0.35s ease;
}

.pip-overlay--visible {
    background: rgba(0, 0, 0, 0.65);
}

/* ── Popup box ──────────────────────────────────────────── */
.pip-popup {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;

    /* entry animation */
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.pip-overlay--visible .pip-popup {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── Image ──────────────────────────────────────────────── */
.pip-popup__body {
    line-height: 0;
}

.pip-popup__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.pip-popup__body a {
    display: block;
    line-height: 0;
}

.pip-popup__body a:hover .pip-popup__image {
    opacity: 0.92;
    transition: opacity 0.2s;
}

/* ── Close button ───────────────────────────────────────── */
.pip-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;

    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;

    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    font-family: Arial, sans-serif;

    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pip-popup__close:hover {
    background: rgba(0, 0, 0, 0.82);
    transform: scale(1.1);
}

.pip-popup__close:focus-visible {
    outline: 3px solid #4a9eff;
    outline-offset: 2px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .pip-overlay {
        padding: 16px;
        align-items: center;
    }

    .pip-popup__text {
        padding: 26px 22px;
    }

    .pip-popup__title {
        font-size: 21px;
    }

    .pip-popup__content {
        font-size: 17px;
    }
}

/* ── Text section ───────────────────────────────────────── */
.pip-popup__text {
    padding: 40px 44px;
    box-sizing: border-box;
}

.pip-popup__title {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
}

.pip-popup__content {
    font-size: 19px;
    line-height: 1.65;
    margin: 0;
}

.pip-popup__content p {
    margin: 0 0 10px;
}

.pip-popup__content p:last-child {
    margin-bottom: 0;
}

.pip-popup__btn {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.18s ease;
}

.pip-popup__btn:hover {
    background: #005a87;
    color: #fff;
}

