/* =========================================================
   Befeld bildbox
   ========================================================= */

.befeld-bildbox {
    margin: 10px 0;
}

.befeld-bildbox-link {
    display: none;
}

.befeld-bildbox-link:first-child {
    display: inline-block;
}

.befeld-bildbox-text {
    display: inline-block;
    padding: 4px 0;
    color: #176b31;
    text-decoration: underline;
    cursor: pointer;
}

.befeld-bildbox-text:hover {
    color: #333;
}


/* =========================================================
   bildbox Overlay
   ========================================================= */

.befeld-bildbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.85);
}


/* =========================================================
   Bildbereich
   ========================================================= */

.befeld-bildbox-window {
    position: relative;

    max-width: 95vw;
    max-height: 95vh;

    display: flex;
    align-items: center;
    justify-content: center;
}

.befeld-bildbox-image {
    display: block;

    max-width: 85vw;
    max-height: 80vh;

    width: auto;
    height: auto;

    object-fit: contain;
}


/* =========================================================
   Schließen
   ========================================================= */

.befeld-bildbox-close {
    position: absolute;

    top: -45px;
    right: 0;

    width: 36px;
    height: 36px;

    border: 0;
    background: transparent;

    color: #fff;
    font-size: 30px;
    line-height: 36px;

    cursor: pointer;
}

.befeld-bildbox-close:hover {
    color: #ccc;
}


/* =========================================================
   Vor / Zurück
   ========================================================= */

.befeld-bildbox-prev,
.befeld-bildbox-next {
    position: fixed;
    top: 50%;

    width: 50px;
    height: 70px;

    margin-top: -35px;

    border: 0;
    background: rgba(0, 0, 0, 0.35);

    color: #fff;

    font-size: 40px;
    line-height: 70px;

    text-align: center;

    cursor: pointer;
}

.befeld-bildbox-prev {
    left: 15px;
}

.befeld-bildbox-next {
    right: 15px;
}

.befeld-bildbox-prev:hover,
.befeld-bildbox-next:hover {
    background: rgba(0, 0, 0, 0.65);
}


/* =========================================================
   Bildzähler
   ========================================================= */

.befeld-bildbox-counter {
    position: fixed;

    left: 50%;
    bottom: 20px;

    transform: translateX(-50%);

    color: #fff;

    font-size: 13px;
    line-height: 20px;

    background: rgba(0, 0, 0, 0.55);

    padding: 3px 10px;
}


/* =========================================================
   Bildtitel
   ========================================================= */

.befeld-bildbox-title {
    position: fixed;

    left: 50%;
    bottom: 50px;

    transform: translateX(-50%);

    max-width: 80vw;

    color: #fff;

    font-size: 13px;
    text-align: center;
}


/* =========================================================
   Mobil
   ========================================================= */

@media (max-width: 600px) {

    .befeld-bildbox-overlay {
        padding: 10px;
    }

    .befeld-bildbox-image {
        max-width: 92vw;
        max-height: 75vh;
    }

    .befeld-bildbox-prev,
    .befeld-bildbox-next {
        width: 40px;
        height: 55px;

        margin-top: -27px;

        font-size: 30px;
        line-height: 55px;
    }

    .befeld-bildbox-prev {
        left: 5px;
    }

    .befeld-bildbox-next {
        right: 5px;
    }

    .befeld-bildbox-close {
        top: -40px;
        right: 0;
    }
}