.weblogPost {
    display: flex;
    flex-direction: column;
    gap: var(--gridGutter);
}

.weblogPost__backLink {
    font-family: var(--proximaMedium);
    font-size: var(--h4Size);
    color: var(--baseLight900);
}

.weblogPost .postListPost__intro,
.weblogPost__text,
.weblogPost .weblogPost__attachments {
    margin-block-end: 3rem;
}

.weblogPost__titleSection {
    text-align: center;
}

.weblogPost .postMetaInfo {
    justify-content: center;
    text-align: left;
}

.weblogPost__title {
    margin-bottom: 2rem;
}

.weblogPost .postListPost__intro {
    margin-inline: auto;
    font-size: var(--introSize);
}

.weblogPost__image,
.weblogPost__image img {
    border-radius: var(--borderRadiusSmall);
}

.weblogPost__text,
.weblogPost .weblogPost__attachments {
    margin-inline: auto;
}

.weblogPost__contentSection {
    position: relative;
    margin-block: var(--marginSmall);
}

.weblogPost__share {
    margin-top: var(--marginSmall);
}

@media (min-width: 768px) {
    .weblogPost .postListPost__intro,
    .weblogPost .weblogPost__text,
    .weblogPost .weblogPost__attachments {
        max-width: 60%;
    }

    .weblogPost .weblogPost__text {
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .weblogPost .weblogPost__textInner {
        min-width: 100%;
    }

    .weblogPost__share:has(.ShareButtons--sizeSmall) {
        --socialMediaButtonSize: 1.5rem;

        &:has(.ShareButtons--textVisible) {
            --socialMediaButtonSize: 6rem;
        }
    }

    .weblogPost__share:has(.ShareButtons--sizeNormal) {
        --socialMediaButtonSize: 2rem;

        &:has(.ShareButtons--textVisible) {
            --socialMediaButtonSize: 8rem;
        }
    }

    .weblogPost__share:has(.ShareButtons--sizeLarge) {
        --socialMediaButtonSize: 2.5rem;

        &:has(.ShareButtons--textVisible) {
            --socialMediaButtonSize: 9rem;
        }
    }

    .weblogPost__share {
        display: flex;
        align-items: flex-start;
        flex: 0 0 var(--socialMediaButtonSize);
        max-width: var(--socialMediaButtonSize);
        margin-block: 0;
    }

    .weblogPost__share .ShareButtons {
        flex-direction: column;
    }

    .weblogPost .weblogPost__text.--shareButtonsBelowText {
        flex-direction: column;
    }

    .--shareButtonsBelowText .weblogPost__share {
        flex: 0 0 100%;
        max-width: fit-content;
        margin-inline: 0;
    }

    .--shareButtonsBelowText .weblogPost__share .ShareButtons {
        flex-direction: row;
    }
}

/**
 * Weblog detailpage on a sidebar UI-variant
 * Only set or reset values if sidebar variant has content in aside
 */

.variantSidebar:has(.aside article) .weblogPost__titleSection {
    text-align: left;
}

.variantSidebar:has(.aside article) .weblogPost .postMetaInfo {
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .variantSidebar:has(.aside article) .weblogPost .postListPost__intro,
    .variantSidebar:has(.aside article) .weblogPost .weblogPost__text,
    .variantSidebar:has(.aside article) .weblogPost .weblogPost__attachments,
    .variantSidebar:has(.aside article) .weblogPost .weblogPost__navigation {
        max-width: none;
    }

    .variantSidebar:has(.aside article) .weblogPost .weblogPost__text {
        flex-direction: column;
    }

    .variantSidebar:has(.aside article) .weblogPost__share .ShareButtons {
        flex-direction: row;
        flex-wrap: nowrap;
    }
}
