/* ==========================================================================
   ZHZ Content Slider – Frontend Styles
   Pfeil-Stile 1–5 + Basis-Layout
   ========================================================================== */

/* Wrapper */
.zhz-cs-wrapper {
    position: relative;
    width: 100%;
}

/* Slide-Inner */
.zhz-cs-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.zhz-cs-text1,
.zhz-cs-text2 {
    word-break: break-word;
}

/* Bild-Wrapper */
.zhz-cs-img {
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 4px;
}

.zhz-cs-img img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Placeholder (OPC Editor) */
.zhz-cs-img--placeholder {
    background: #e9ecef;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
    border-radius: 4px;
}

/* ==========================================================================
   Pfeil-Stile
   ========================================================================== */

/* Basis: Swiper-Buttons zurücksetzen */
.zhz-cs-wrapper .swiper-button-prev,
.zhz-cs-wrapper .swiper-button-next {
    width: 40px;
    height: 40px;
    margin-top: -20px;
    transition: opacity 0.2s, transform 0.15s;
}

.zhz-cs-wrapper .swiper-button-prev:after,
.zhz-cs-wrapper .swiper-button-next:after {
    font-size: 16px;
    font-weight: 700;
}

/* ---- Stil 1: Standard Chevron (Swiper-Default leicht angepasst) ---------- */
.zhz-cs-arrow-style1 .swiper-button-prev,
.zhz-cs-arrow-style1 .swiper-button-next {
    color: #333;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.zhz-cs-arrow-style1 .swiper-button-prev:hover,
.zhz-cs-arrow-style1 .swiper-button-next:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ---- Stil 2: Kreis -------------------------------------------------------- */
.zhz-cs-arrow-style2 .swiper-button-prev,
.zhz-cs-arrow-style2 .swiper-button-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
}

.zhz-cs-arrow-style2 .swiper-button-prev:after,
.zhz-cs-arrow-style2 .swiper-button-next:after {
    font-size: 14px;
}

.zhz-cs-arrow-style2 .swiper-button-prev:hover,
.zhz-cs-arrow-style2 .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.75);
}

/* ---- Stil 3: Eckig (quadratisch, farbig) ---------------------------------- */
.zhz-cs-arrow-style3 .swiper-button-prev,
.zhz-cs-arrow-style3 .swiper-button-next {
    color: #fff;
    background: #333;
    border-radius: 0;
    width: 42px;
    height: 42px;
    margin-top: -21px;
}

.zhz-cs-arrow-style3 .swiper-button-prev:after,
.zhz-cs-arrow-style3 .swiper-button-next:after {
    font-size: 14px;
}

.zhz-cs-arrow-style3 .swiper-button-prev:hover,
.zhz-cs-arrow-style3 .swiper-button-next:hover {
    background: #000;
}

/* ---- Stil 4: Minimal (nur Pfeil, kein Hintergrund) ----------------------- */
.zhz-cs-arrow-style4 .swiper-button-prev,
.zhz-cs-arrow-style4 .swiper-button-next {
    color: #333;
    background: transparent;
    box-shadow: none;
    opacity: 0.6;
}

.zhz-cs-arrow-style4 .swiper-button-prev:after,
.zhz-cs-arrow-style4 .swiper-button-next:after {
    font-size: 22px;
    font-weight: 400;
}

.zhz-cs-arrow-style4 .swiper-button-prev:hover,
.zhz-cs-arrow-style4 .swiper-button-next:hover {
    opacity: 1;
}

/* ---- Stil 5: Fett / Outline-Kreis ---------------------------------------- */
.zhz-cs-arrow-style5 .swiper-button-prev,
.zhz-cs-arrow-style5 .swiper-button-next {
    color: #333;
    background: transparent;
    border: 2px solid #333;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
}

.zhz-cs-arrow-style5 .swiper-button-prev:after,
.zhz-cs-arrow-style5 .swiper-button-next:after {
    font-size: 13px;
    font-weight: 900;
}

.zhz-cs-arrow-style5 .swiper-button-prev:hover,
.zhz-cs-arrow-style5 .swiper-button-next:hover {
    background: #333;
    color: #fff;
}

/* ==========================================================================
   OPC-Editor Fallback: Swiper nicht initialisiert → Grid-Vorschau
   Swiper fügt .swiper-initialized erst nach JS-Init hinzu.
   Im OPC-Editor läuft kein JS → Slides werden als Flex-Grid angezeigt.
   ========================================================================== */
.zhz-cs-swiper:not(.swiper-initialized) {
    overflow: visible;
}

.zhz-cs-swiper:not(.swiper-initialized) .swiper-wrapper {
    flex-wrap: wrap;
    gap: var(--zhz-cs-gap, 16px);
    transform: none !important;
    transition: none !important;
}

.zhz-cs-swiper:not(.swiper-initialized) .swiper-slide {
    width: calc(
        100% / var(--zhz-cs-cols, 4)
        - var(--zhz-cs-gap, 16px) * (var(--zhz-cs-cols, 4) - 1) / var(--zhz-cs-cols, 4)
    ) !important;
    margin: 0 !important;
}

/* ==========================================================================
   Swiper Pagination (Dots)
   ========================================================================== */
.zhz-cs-wrapper .swiper-pagination-bullet {
    background: #999;
    opacity: 0.6;
}

.zhz-cs-wrapper .swiper-pagination-bullet-active {
    background: #333;
    opacity: 1;
}
