@charset "utf-8";

/* =========================================
   1. BASIS SETUP (Für alle Slider-Typen)
   ========================================= */

.ba-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.2); 
    line-height: 0;
}

/* Allgemeine Regel für alle Bilder im Slider */
.ba-slider img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Das Hintergrundbild */
.ba-image-bg {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* Das Vordergrundbild  */
.ba-image-fg {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none !important;
    max-height: none !important;
    width: auto; 
    height: auto; 
    display: block;
    object-fit: cover; 
}

/* Der Wrapper (Overlay) */
.ba-overlay {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 2;
    margin: 0;
    padding: 0;
    width: 50%;
    height: 100%;
}

/* Der Range Input */
.ba-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    cursor: ew-resize; 
    margin: 0;
    padding: 0;
}

/* Der Griff / Die Trennlinie (Generell) */
.ba-handle {
    position: absolute;
    z-index: 3;
    pointer-events: none; 
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}
/* --- Beschreibung (Description) --- */
.ba-item-wrapper .ba-description {
    margin-top: 15px;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    width: 100%;
    overflow-wrap: break-word; 
    word-wrap: break-word;
    hyphens: auto; 
}

/* --- Credits (Bildnachweis) --- */
.ba-item-wrapper .ba-credits {
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #f8f8f8; 
    border-left: 3px solid #ddd; 
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    
    /* Auch hier Textumbruch sichern */
    overflow-wrap: break-word;
}

/* Hauptcontainer: Begrenzt die Breite auf den verfügbaren Platz */
.mod_image_comparison_gallery {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    clear: both;
}

/* --- Header & Footer Bereiche des Moduls --- */
.mod_image_comparison_gallery #header,
.mod_image_comparison_gallery #headerdesc,
.mod_image_comparison_gallery #footer {
    padding: 15px 0;
    line-height: 1.5;
    overflow-wrap: break-word; 
    word-wrap: break-word;
    max-width: 100%;
}

.mod_image_comparison_gallery #headerdesc {
    padding-top: 0; 
    font-size: 0.95em;
    color: #555;
    margin-bottom: 20px;
}

.ba-item-wrapper:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.ba-item-wrapper h3 {
    margin: 0 0 15px 0;
    padding: 0;
    font-size: 1.4rem;
}


/* =========================================
   2. TYP: HORIZONTAL (Standard)
   ========================================= */
.ba-type-horizontal .ba-overlay {
    border-right: 2px solid #fff; /* Die weiße Linie */
}

.ba-type-horizontal .ba-handle {
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Runder Kreis */
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pfeile im Griff */
.ba-type-horizontal .ba-handle::after {
    content: '⇄'; 
    color: #333;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
}


/* =========================================
   3. TYP: VERTIKAL
   ========================================= */
.ba-type-vertical .ba-overlay {
    width: 100% !important; /* Immer volle Breite */
    border-bottom: 2px solid #fff;
}

/* Slider drehen für Vertikal-Steuerung */
.ba-type-vertical .ba-range {
    width: 100vh; 
    height: 100vw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    cursor: ns-resize;
}

.ba-type-vertical .ba-handle {
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-type-vertical .ba-handle::after {
    content: '⇅'; 
    color: #333;
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
}


/* =========================================
   4. TYP: FADER (Transparenz)
   ========================================= */
.ba-type-fader .ba-overlay {
    width: 100% !important;
    height: 100%;
    border: none;
    opacity: 0;
    will-change: opacity;
}

.ba-type-fader .ba-handle {
    display: none; 
}


/* =========================================
   5. TYP: LENS (Lupe)
   ========================================= */
.ba-type-lens {
    cursor: crosshair;
}

.ba-type-lens .ba-overlay {
    width: 100% !important;
    height: 100%;
    clip-path: circle(0px at 0px 0px);
    transition: clip-path 0.05s linear; 
}

/* Range Input stört hier nur */
.ba-type-lens .ba-range, 
.ba-type-lens .ba-handle {
    display: none !important;
}


/* =========================================
   6. TYP: DIAGONAL (Schräg / Slanted)
   ========================================= */

.ba-type-diagonal .ba-overlay {
    width: 100% !important; 
    height: 100% !important;
    border: none;
}

.ba-type-diagonal .ba-handle {
    top: 50%;
    height: 300%; 
    width: 4px; 
    background: #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    border-radius: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(15deg); 
}

.ba-type-diagonal .ba-handle::after {
    content: '⇄';
    color: #333;
    font-weight: bold;  
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) rotate(-15deg);
}