/*
 * Gemeinsame Basis
 */
.ai-disclosure {
    isolation: isolate;
}

.ai-disclosure--positioned {
    position: relative;
}

/*
 * Bild-Variante
 */
.ai-disclosure--image {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    vertical-align: top;
}

.ai-disclosure--image > a,
.ai-disclosure--image > picture {
    display: block;
}

.ai-disclosure--image img {
    display: block;
    max-width: 100%;
    height: auto;
}

/*
 * Allgemeine Bereiche:
 * Textboxen, Cards, Sections, Container usw.
 */
.ai-disclosure--area {
    isolation: isolate;
}

/*
 * KI-Button
 */
.ai-disclosure__toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 20;

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

    min-width: 38px;
    min-height: 38px;
    padding: 7px 10px;

    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;

    background: rgba(20, 20, 20, 0.84);
    color: #fff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.25);

    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.ai-disclosure__toggle:hover {
    background: rgba(0, 0, 0, 0.96);
    transform: translateY(-1px);
    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.3);
}

.ai-disclosure__toggle:active {
    transform: translateY(0);
}

.ai-disclosure__toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/*
 * Aufgeklappter Hinweis
 */
.ai-disclosure__panel {
    position: absolute;
    right: 12px;
    bottom: 58px;
    z-index: 21;

    width: max-content;
    max-width: min(
        320px,
        calc(100% - 24px)
    );

    padding: 9px 12px;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 7px;

    background: rgba(20, 20, 20, 0.94);
    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.32);

    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ai-disclosure__panel[hidden] {
    display: none;
}

/*
 * Optional:
 * Bei Textboxen kann zusätzlicher Platz für den
 * Button reserviert werden.
 *
 * Nur verwenden, wenn der Button sonst Text überlagert.
 */
.has-ai-label.ai-label-space {
    padding-bottom: 64px;
}

/*
 * Mobile Anpassungen
 */
@media (max-width: 575.98px) {
    .ai-disclosure__toggle {
        right: 8px;
        bottom: 8px;

        min-width: 38px;
        min-height: 38px;
    }

    .ai-disclosure__panel {
        right: 8px;
        bottom: 54px;

        max-width: calc(100% - 16px);
    }
}

/*
 * Reduzierte Animationen berücksichtigen
 */
@media (prefers-reduced-motion: reduce) {
    .ai-disclosure__toggle {
        transition: none;
    }
}


.woocommerce ul.products li.product-category
.cweb-product-category__image-link {
    display: block;
}

.woocommerce ul.products li.product-category
.ai-disclosure--image {
    display: block;
    width: 100%;
}

.woocommerce ul.products li.product-category
.ai-disclosure--image > a {
    display: block;
}

.woocommerce ul.products li.product-category
.ai-disclosure--image img {
    display: block;
    width: 100%;
}

/*
 * KI-Kennzeichnung:
 * Product Categories Designs for WooCommerce
 */
/*
 * Positionierungsgrundlage für
 * WooCommerce-Kategoriekacheln.
 */
.pcdfwoo-product-cat_inner.ai-disclosure--positioned,
.woocommerce li.product-category.ai-disclosure--positioned {
    position: relative;
}


/*
 * Unsichtbares Overlay exakt über
 * dem eigentlichen Kategoriebild.
 */
.ai-disclosure--woo-category {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    pointer-events: none;
    z-index: 5;
}


/*
 * Nur KI-Button und Hinweis selbst
 * sollen Mausereignisse erhalten.
 */
.ai-disclosure--woo-category
> .ai-disclosure__toggle,
.ai-disclosure--woo-category
> .ai-disclosure__panel {
    pointer-events: auto;
}