/* ---------- enlargeable images ---------- */
.ip-zoomable { cursor: zoom-in; }
.ip-zoomable:focus-visible { outline: 3px solid var(--ip-blue); outline-offset: 4px; border-radius: 12px; }
.ip-zoom-host { position: relative; }
.ip-zoom-host::after {
    content: '';
    position: absolute;
    top: 5%;
    right: 4%;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgb(11 17 32 / 78%) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L20 20M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 20px no-repeat;
    box-shadow: 0 6px 16px -6px rgb(0 0 0 / 50%);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.ip-zoom-host:hover::after,
.ip-zoom-host:focus-within::after { opacity: 1; transform: none; }
@media (hover: none) {
    .ip-zoom-host::after { opacity: 0.9; transform: none; width: 36px; height: 36px; background-size: 17px; }
}

/* ---------- lightbox ---------- */
.ip-lb { position: fixed; inset: 0; z-index: 1000; background: rgb(6 10 20 / 96%); display: flex; flex-direction: column; }
.ip-lb[hidden] { display: none; }
.ip-lb__stage { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 64px 84px 8px; overscroll-behavior: contain; }
.ip-lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 10px; cursor: zoom-in; transition: opacity 0.2s ease; }
.ip-lb.is-loading .ip-lb__img { opacity: 0.3; }
.ip-lb.is-zoomed .ip-lb__stage { align-items: flex-start; justify-content: flex-start; padding: 64px 24px 8px; }
.ip-lb.is-zoomed .ip-lb__img { max-width: none; max-height: none; cursor: zoom-out; margin: auto; }
.ip-lb__bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px 24px 18px; color: #c7d2e5; font-size: 15px; text-align: center; flex-wrap: wrap; }
.ip-lb__count { font-weight: 700; color: #fff; }
.ip-lb__hint { color: #8b9bb6; font-size: 14px; }
.ip-lb__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgb(255 255 255 / 18%); background: rgb(255 255 255 / 10%); color: #fff; cursor: pointer; transition: background-color 0.15s ease; padding: 0; }
.ip-lb__btn:hover { background: rgb(255 255 255 / 22%); }
.ip-lb__btn:focus-visible { outline: 3px solid #7ea2ff; outline-offset: 2px; }
.ip-lb__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ip-lb__btn[hidden] { display: none; }
.ip-lb__close { top: 14px; right: 16px; }
.ip-lb__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.ip-lb__next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 767px) {
    .ip-lb__stage { padding: 60px 10px 4px; }
    .ip-lb__prev, .ip-lb__next { top: auto; bottom: 12px; transform: none; width: 44px; height: 44px; }
    .ip-lb__bar { padding: 14px 64px 20px; font-size: 14px; }
    .ip-lb__hint { display: none; }
}

/* the parent theme paints every focused/hovered button pink — keep the lightbox buttons neutral */
.ip-lb button.ip-lb__btn,
.ip-lb button.ip-lb__btn:focus { background-color: rgb(255 255 255 / 10%); color: #fff; border: 1px solid rgb(255 255 255 / 18%); text-decoration: none; }
.ip-lb button.ip-lb__btn:hover { background-color: rgb(255 255 255 / 22%); color: #fff; }
