/* Editorial feature photographs - responsive layout */
figure.kvu-editorial-photo > img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
figure.kvu-editorial-photo .kvu-photo-credit {
    display: block;
    text-align: right !important;
    margin: 0 0 6px !important;
}
@media screen and (min-width: 951px) {
    figure.kvu-editorial-photo {
        --kvu-photo-bleed: clamp(0px, calc((100vw - 850px) / 2), 60px);
    }
    figure.kvu-editorial-photo.kvu-photo-center {
        width: calc(100% + 2 * var(--kvu-photo-bleed)) !important;
        max-width: none !important;
        margin: 28px calc(-1 * var(--kvu-photo-bleed)) !important;
    }
    figure.kvu-editorial-photo.kvu-photo-left {
        margin-left: calc(-1 * var(--kvu-photo-bleed)) !important;
        width: calc(34% + var(--kvu-photo-bleed)) !important;
        max-width: none !important;
    }
    figure.kvu-editorial-photo.kvu-photo-right {
        margin-right: calc(-1 * var(--kvu-photo-bleed)) !important;
        width: calc(46% + var(--kvu-photo-bleed)) !important;
        max-width: none !important;
    }
}
@media screen and (max-width: 950px) {
    figure.kvu-editorial-photo {
        float: none !important;
        clear: both !important;
        width: 100vw !important;
        max-width: none !important;
        margin: 24px calc(50% - 50vw) !important;
    }
    figure.kvu-editorial-photo figcaption {
        box-sizing: border-box;
        padding: 5px 15px 0 !important;
    }
}

/* Opt-in editorial photo viewer. No legacy photo selectors. */
figure.kvu-editorial-photo.kvu-photo-zoom { position: relative !important; }
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button {
    position: absolute !important; top: 10px; right: 10px; z-index: 2;
    display: grid !important; place-items: center; width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,.65); border-radius: 4px;
    background: rgba(0,0,0,.58); color: white; cursor: pointer;
    padding: 0; margin: 0;
}
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button:hover { background: #3e5a9d; }
.kvu-photo-zoom-button svg { width: 20px; height: 20px; }
.kvu-photo-zoom-button:focus-visible, .kvu-photo-viewer-close:focus-visible { outline: 3px solid #9eafd8; outline-offset: 3px; }
@media (max-width: 950px) {
    figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button { width: 44px; height: 44px; }
    .kvu-photo-viewer-close { min-width: 44px; min-height: 44px; }
}
dialog.kvu-photo-viewer {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    box-sizing: border-box; border: 0; margin: 0; padding: 52px 24px 24px;
    background: transparent; color: white; overflow: auto;
}
dialog.kvu-photo-viewer[open] { display: flex; align-items: center; justify-content: center; }
dialog.kvu-photo-viewer::backdrop { background: rgba(0,0,0,.94); }
dialog.kvu-photo-viewer img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 76px); object-fit: contain; margin: 0; padding: 0; }
.kvu-photo-viewer-close { position: fixed; top: 12px; right: 16px; width: 36px; height: 36px; border: 1px solid #aaa; border-radius: 4px; background: #222; color: white; font: 28px/1 sans-serif; cursor: pointer; }

/* Cosmetic styling only: match the cover photograph information button. */
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button {
    border-radius: 50%;
    border-color: rgba(0,0,0,.12);
    background: #fff;
    color: #777;
    box-shadow: 0 1px 5px rgba(0,0,0,.35);
}
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button:hover {
    background: #3e5a9d;
    color: #fff;
}
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button svg {
    stroke: currentColor;
    stroke-width: 2.8;
    fill: none;
}

/* Standalone zoom icon: retain the existing button hit area and layout. */
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button,
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button:hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
}
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button svg {
    width: 26px;
    height: 26px;
    stroke-width: 3;
    overflow: visible;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.95)) drop-shadow(0 0 1px rgba(0,0,0,.8));
    transition: transform .15s ease;
}
figure.kvu-editorial-photo.kvu-photo-zoom > .kvu-photo-zoom-button:hover svg {
    transform: scale(1.12);
}
