/* Local, resilient presentation for AddToAny-powered article sharing. */
.c2p-share-widget {
    display: inline-block;
    position: relative;
    z-index: 20;
}

.c2p-share-popover {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    left: auto;
    min-width: max-content;
    padding: 10px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 10000;
}

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

.c2p-share-popover .addtoany_list {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    white-space: nowrap;
}

/* The card normally clips its image to rounded corners, which also clips a
 * share popover. The image has its own clipping container, so this card can
 * safely allow the menu to extend beyond its bottom edge. */
.featured-post-card,
.featured-post-card .service-details,
.featured-post-card .service-actions {
    overflow: visible !important;
}

.featured-post-card:has(.c2p-share-popover:not([hidden])) {
    position: relative;
    z-index: 30;
}

/* Explicitly space the inline service icons in the single-post header. */
.article-share-label + .addtoany_list,
.article-share-label + .a2a_kit.addtoany_list {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.a2a_kit a.c2p-share-hydrated {
    align-items: center;
    border-radius: 4px;
    display: inline-flex !important;
    height: 32px;
    justify-content: center;
    margin: 0;
    padding: 0;
    flex: 0 0 32px;
    width: 32px;
}

.a2a_kit a.c2p-share-hydrated img {
    display: block;
    height: 32px;
    width: 32px;
}
