/* =========================================================
   WFB Lightbox
========================================================= */

img.karte-bild,
img.detailfoto,
img[data-lightbox] {
    cursor: zoom-in;
}

html.lightbox-offen,
body.lightbox-offen {
    overflow: hidden !important;
}

.wfb-lightbox[hidden] {
    display: none !important;
}

.wfb-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;

    padding: 28px !important;

    background: rgba(0, 0, 0, 0.9) !important;
}

.wfb-lightbox__dialog {
    position: relative !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    max-width: calc(100vw - 56px) !important;
    max-height: calc(100vh - 56px) !important;
}

.wfb-lightbox__bild {
    display: block !important;

    width: auto !important;
    height: auto !important;

    max-width: calc(100vw - 56px) !important;
    max-height: calc(100vh - 56px) !important;

    object-fit: contain !important;

    border-radius: 12px !important;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.65) !important;

    cursor: zoom-out !important;
}

.wfb-lightbox__schliessen {
    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 2 !important;

    width: 48px !important;
    height: 48px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #ffffff !important;
    background: #0b5184 !important;

    border: 2px solid #ffffff !important;
    border-radius: 50% !important;

    font: 400 32px/1 Arial, Helvetica, sans-serif !important;

    cursor: pointer !important;
}

.wfb-lightbox__schliessen:hover,
.wfb-lightbox__schliessen:focus-visible {
    background: #147aa3 !important;
    outline: 3px solid #ffd21a !important;
    outline-offset: 3px !important;
}

@media (max-width: 600px) {
    .wfb-lightbox {
        padding: 14px !important;
    }

    .wfb-lightbox__bild {
        max-width: calc(100vw - 28px) !important;
        max-height: calc(100vh - 28px) !important;
    }

    .wfb-lightbox__schliessen {
        top: 10px !important;
        right: 10px !important;
    }
}
