/* Image previews and an accessible, shared photo viewer. */
.news-card .news-art { background: #eff5fa; }
.news-card .news-art img { object-fit: contain; object-position: center; }
[data-gallery-image] { cursor: zoom-in; }
.spzoz-news-article [data-gallery-image] { display: block; border-radius: 12px; }
.spzoz-news-article [data-gallery-image]:focus-visible { outline: 3px solid #a84200; outline-offset: 4px; }
body.gallery-is-open { overflow: hidden; }
#gallery-dialog {
    width: min(1100px, calc(100vw - 24px));
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 16px;
    color: #17314d;
    background: #fff;
    border: 2px solid #0057b8;
    overflow: auto;
}
#gallery-dialog::backdrop { background: #071c38e6; }
.gallery-dialog-toolbar, .gallery-dialog-navigation { display: flex; align-items: center; gap: 12px; }
.gallery-dialog-toolbar { justify-content: space-between; margin-bottom: 12px; }
#gallery-title { font-size: 1.25rem; margin: 0; letter-spacing: 0; }
.gallery-dialog-navigation { justify-content: space-between; margin-bottom: 14px; }
#gallery-dialog button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    min-width: 44px;
    margin: 0;
    padding: 8px 14px;
    color: #fff;
    background: #0057b8;
    border: 2px solid #0057b8;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
}
#gallery-dialog button:hover { background: #087f35; border-color: #087f35; }
#gallery-dialog button:focus-visible { outline: 3px solid #a84200; outline-offset: 3px; }
#gallery-dialog #gallery-counter { margin: 0; padding: 0; font-size: .9rem; text-align: center; }
#gallery-dialog #gallery-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 220px);
    max-height: calc(100dvh - 220px);
    margin: 0 auto;
    object-fit: contain;
    border-radius: 8px;
}
#gallery-dialog #gallery-caption { font-size: .95rem; line-height: 1.5; padding-top: 12px; margin: 0; }
.high-contrast .news-card .news-art { background: #111; }
.high-contrast #gallery-dialog { background: #000; color: #fff; border-color: #ffe760; }
.high-contrast #gallery-dialog button { background: #000; color: #ffe760; border-color: #ffe760; }
.high-contrast #gallery-dialog button:hover { background: #ffe760; color: #000; }
.high-contrast #gallery-dialog button:focus-visible,
.high-contrast .spzoz-news-article [data-gallery-image]:focus-visible { outline-color: #ffe760; }
@media (max-width: 480px) {
    #gallery-dialog { padding: 12px; }
    #gallery-title { font-size: 1rem; }
    #gallery-dialog button { padding: 8px; font-size: .8rem; }
    .gallery-dialog-navigation { gap: 6px; }
    #gallery-dialog #gallery-counter { font-size: .8rem; }
    #gallery-dialog #gallery-image { max-height: calc(100dvh - 240px); }
}
@media (forced-colors: active) {
    #gallery-dialog { color: CanvasText; background: Canvas; border-color: LinkText; }
    #gallery-dialog button { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
    #gallery-dialog button:focus-visible { outline-color: Highlight; }
}
@media print {
    #gallery-dialog { display: none !important; }
    body.gallery-is-open { overflow: visible; }
}
