/* Custom GLightbox styles für maxbaechli theme */

/* GLightbox Hintergrund auf weiß mit 90% Transparenz (10% Deckkraft) */
.glightbox-clean .goverlay {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* Alternativ für ältere GLightbox Versionen */
.glightbox-clean {
    background: rgba(255, 255, 255, 0.6) !important;
}

/* GLightbox Container Hintergrund */
.glightbox-clean .gcontainer {
    background: transparent;
}

/* GLightbox Anpassungen - kein Schatten */
.glightbox-clean .gclose {
    color: transparent; /* Text/X verbergen */
    opacity: 0.9;
    width: 100px;
    height: 100px;
    line-height: 40px;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.9);
    background-image: url('assets/icons/close.png'), url('assets/icons/close.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 24px 24px;
    border-radius: 50%;
    box-shadow: none;
    z-index: 1001; /* höher als .gprev/.gnext (999) */
}

.glightbox-clean .gclose:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: none;
}

/* Nur eigenes Icon im Close-Button anzeigen: internes GLightbox-SVG verbergen */
.glightbox-clean .gclose svg,
.glightbox-clean .gclose > svg,
.glightbox-clean .gclose .gclose-icon {
    display: none !important;
}
.glightbox-clean .gclose::before,
.glightbox-clean .gclose::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Navigation Buttons - über die Bildhälften */
.glightbox-clean .gnext,
.glightbox-clean .gprev {
    color: transparent;
    opacity: 0;
    font-size: 20px;
    background: transparent;
    border-radius: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    position: absolute;
    top: 0;
    z-index: 999;
    transition: opacity 0.3s ease;
}

.glightbox-clean .gprev {
    left: 0;
    cursor: w-resize;
}

.glightbox-clean .gnext {
    right: 0;
    cursor: e-resize;
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
    opacity: 0.1;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Benutzerdefinierte Cursor für GLightbox Navigation */
.glightbox-clean .gbtn:not(.gclose),
.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gprev .gbtn,
.glightbox-clean .gnext .gbtn {
    cursor: none; /* Basis-Cursor ausblenden, wir setzen eigene auf Hover */
}

/* Close-Button: immer Standard-Cursor und über den Prev/Next-Flächen */
/* Close-Button: Pointer-Cursor (Hand) zur klaren Klick-Indikation */
.glightbox-clean .gclose,
.glightbox-clean .gclose:hover {
    cursor: pointer !important;
}

.glightbox-clean .gprev:hover,
.glightbox-clean .gprev .gbtn:hover,
.glightbox-clean button.prev:hover {
    cursor: url('assets/cursors/cursor-prev.png') 16 16, url('assets/cursors/cursor-prev.svg') 16 16, w-resize;
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gnext .gbtn:hover,
.glightbox-clean button.next:hover {
    cursor: url('assets/cursors/cursor-next.png') 16 16, url('assets/cursors/cursor-next.svg') 16 16, e-resize;
}

/* Counter Styling */
.gslide-title {
    font-size: var(--font-size-media-info-gallery) !important;
    font-family: var(--font-family-media-info) !important;
    font-weight: var(--font-weight-media-info) !important;
    color: var(--color-basic-grey, #666) !important;
    margin-bottom: 10px;
}

.glightbox-clean .gslide-desc {
    display: none !important;
}

 .gdesc-inner {
    padding: 0px !important;
}

/* Loader */

/* Alle möglichen Schatten entfernen */
.glightbox-clean .gslide,
.glightbox-clean .gslide-inner,
.glightbox-clean .gslide-media,
.glightbox-clean .gslide img {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Zoom deaktivieren */
.glightbox-clean .gslide img {
    cursor: default !important;
    pointer-events: none !important;
}

.glightbox-clean .gslide-media {
    cursor: default !important;
}

/* Zoom-Funktionen komplett deaktivieren */
.glightbox-clean .gzoom-overlay,
.glightbox-clean .gzoom-in,
.glightbox-clean .gzoom-out {
    display: none !important;
}

/* Mobile Anpassungen - kein Schatten */
@media screen and (max-width: 769px) {
    .glightbox-clean .gnext,
    .glightbox-clean .gprev {
        width: 50%;
        height: 100%;
        font-size: 16px;
        box-shadow: none;
        opacity: 0;
    }
    
    .glightbox-clean .gnext:hover,
    .glightbox-clean .gprev:hover {
        opacity: 0.2;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .glightbox-clean .gclose {
        font-size: 20px;
        padding: 8px;
        box-shadow: none;
    }
}

/* Mobile: Media + Description als feste Streifen-Aufteilung */
@media screen and (max-width: 769px) {
    body.glightbox-mobile .glightbox-container {
        --glightbox-desc-strip-height: 80px;
    }

    body.glightbox-mobile .glightbox-container .gslide-media {
        margin-bottom: var(--glightbox-desc-strip-height);
    }

    body.glightbox-mobile .glightbox-container .gslide-description {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--glightbox-desc-strip-height);
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        background: transparent;
    }
}

/* Mobile: Verlauf (Gradient) der Standard-GLightbox-Beschreibung entfernen */
@media screen and (max-width: 769px) {
    .glightbox-mobile .glightbox-container .gslide-description {
        background: none !important;
        background-color: transparent !important;
    }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
    .glightbox-clean .gprev,
    .glightbox-clean .gnext {
        width: 20%; /* Wunsch: 20% im Querformat (auch für Tablets im Landscape) */
    }
    #glightbox-slider,
    .glightbox-clean .gslide,
    .glightbox-clean .ginner-container { touch-action: pan-y pinch-zoom; }
}
