.article-header--has-share-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 24px;
    row-gap: 4px;
    padding-block: 12px;
}

.article-header--has-share-tools .article-header-details {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
}

.article-header--has-share-tools .article-toc {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: end;
}

.article-header--has-share-tools .toc-button {
    min-height: 44px;
    padding: 7px 14px;
    font-size: 0.72rem;
}

.share-tools {
    position: relative;
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    align-self: center;
    justify-self: end;
    gap: 6px;
    min-width: 0;
    color: var(--ink, #1b1e23);
}

.share-tools[hidden] {
    display: none;
}

.share-tools__label {
    margin: 0;
    color: var(--blue-dark, #004a99);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-align: end;
    text-transform: uppercase;
    white-space: nowrap;
}

.share-tools__actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.share-tools__action {
    --share-action-bg: var(--black-soft, #111317);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease;
}

.share-tools__action--facebook {
    --share-action-bg: #1877f2;
}

.share-tools__action--pinterest {
    --share-action-bg: #bd081c;
}

.share-tools__action--x {
    --share-action-bg: #000;
}

.share-tools__action--whatsapp {
    --share-action-bg: #128c7e;
}

.share-tools__action--native {
    --share-action-bg: var(--blue, #0066cc);
}

.share-tools__action--success {
    --share-action-bg: #1f7a3d;
}

.share-tools__action:focus-visible {
    outline: 3px solid var(--blue, #0066cc);
    outline-offset: 3px;
}

.share-tools__icon {
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: 50%;
    background: var(--share-action-bg);
    box-shadow: 0 3px 9px rgba(9, 16, 29, 0.2);
    pointer-events: none;
}

.share-tools__separator {
    width: 1px;
    height: 24px;
    margin-inline: 1px;
    background: var(--line, #d9dde3);
}

.share-tools__status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.share-tools__status:empty {
    display: none;
}

.share-tools__action--mobile {
    display: none;
}

@media (hover: hover) {
    .share-tools__action:hover {
        filter: brightness(0.84);
        transform: translateY(-1px);
    }
}

@media (max-width: 768px) {
    .article-header--has-share-tools {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        row-gap: 8px;
    }

    .article-header--has-share-tools .article-header-details {
        grid-column: 1;
        grid-row: 1;
    }

    .article-header--has-share-tools .article-toc {
        grid-column: 1;
        grid-row: 3;
        justify-self: stretch;
        width: 100%;
    }

    .article-header--has-share-tools .article-toc .toc-dropdown {
        width: min(100%, 330px);
        max-width: 100%;
    }

    .share-tools {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        width: 100%;
    }

    .share-tools__label {
        text-align: start;
    }

    .share-tools__actions {
        justify-content: flex-start;
    }

    .share-tools__action--mobile {
        display: inline-flex;
    }

    .share-tools__action--desktop,
    .share-tools__separator {
        display: none;
    }
}

@media (max-width: 359px) {
    .share-tools__label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        border: 0;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media print {
    .page-logo,
    .share-tools {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .share-tools__action {
        transition: none;
    }

    .share-tools__action:hover {
        transform: none;
    }
}
