.msabg-infobox {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 25px;
    border-radius: 15px;
    color: #000;
}

.msabg-infobox__icon {
    flex: 0 0 17px;
    width: 17px;
    height: auto;
    margin-top: 5px;
}

.msabg-infobox__text {
    flex: 1 1 auto;
    min-width: 0;
}

.msabg-infobox__text > :last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.msabg-infobox .msabg-infobox__text a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* top margin of the former Divi blurb, set on the module so an empty shortcode leaves no gap */
.et_pb_code:has(.msabg-infobox) {
    margin-top: 49px;
}

.et_pb_portfolio_item.msabg-ausgebucht .et_portfolio_image {
    position: relative;
}

/* z-index above Divi's hover overlay (z-index 3) */
.et_pb_portfolio_item.msabg-ausgebucht .et_portfolio_image::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--msabg-infobox-bg, #fecc36);
    background-image: var(--msabg-infobox-icon, none);
    background-position: center;
    background-repeat: no-repeat;
    background-size: auto 60%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
    pointer-events: none;
}

.et_pb_portfolio_item.msabg-ausgebucht .et_portfolio_image::before {
    content: var(--msabg-tile-label, none);
    position: absolute;
    top: 34px;
    right: 64px;
    z-index: 4;
    box-sizing: border-box;
    max-width: calc(100% - 76px);
    padding: 6px 12px;
    border-radius: 15px;
    background: #fff;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.3s;
    pointer-events: none;
}

.et_pb_portfolio_item.msabg-ausgebucht:hover .et_portfolio_image::after {
    background-color: #fff;
}

.et_pb_portfolio_item.msabg-ausgebucht:hover .et_portfolio_image::before {
    opacity: 1;
}
