/*
 * BubbleTeaser — layout-5 "Design 2026" variant (.BubbleTeaser)
 *
 * Loaded ONLY on the <f:case value="5"> branch of
 * ContentBlocks/ContentElements/bubble-teaser/templates/frontend.html.
 * The legacy default-layout variant (.bubble-teaser) lives in the sibling
 * BubbleTeaserDefault.css, loaded only on <f:defaultCase> — so each layout
 * ships only the CSS it needs.
 *
 * Live layout-5 page (as of 2026-06-04, CType mask_bubble_teaser):
 *   - /leasing/absatzfinanzierung/ (4 elements)
 */

.BubbleTeaser {
    --border-radius: 1rem;

    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.BubbleTeaser .youtube-cookie {
    top: 0;
    bottom: auto;
}

.BubbleTeaser--youtube a:has(.BubbleTeaser-image) {
    position: relative;
    display: block;

    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: var(--border-radius);
        background-color: rgba(255, 255, 255, 0.25);
        pointer-events: none;
    }

    &::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 5rem;
        height: 5rem;
        background-image: url(../../../Icons/circle-red-play.svg);
        background-repeat: no-repeat;
        background-position: 50% 50%;
        background-size: 100% 100%;
        pointer-events: none;
    }
}

.BubbleTeaser-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    object-view-box: inset(0%);
    border-radius: var(--border-radius);
    transition: object-view-box 150ms ease-in-out;

    &:hover {
        object-view-box: inset(3%);
    }
}

.BubbleTeaser > p {
    flex-grow: 1;
    margin: 0;
}

.BubbleTeaser-link {
    color: inherit;
    font-size: 0.875rem;

    &::after {
        content: "";
        width: 0.7em;
        height: 0.7em;
        display: inline-block;
        background-image: url(../../../Icons/chevron-red.svg);
        background-repeat: no-repeat;
        background-position: 50% 50%;
        background-size: 100% 100%;
        margin-left: 0.2em;
    }
}
