/* --- SHARE BAR COMPONENT (share popover, print, bookmark between two rules) --- */
.share-bar {
    padding: var(--share-bar-padding, 30px 5%);
}

.share-bar-inner {
    max-width: var(--share-bar-max-width, var(--content-max-width, 1200px));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: var(--share-bar-justify, flex-start);
    gap: var(--share-bar-gap, 0 30px);
    padding: var(--share-bar-inner-padding, 20px 0);
    border-top: var(--share-bar-rule, 1px solid currentColor);
    border-bottom: var(--share-bar-rule-bottom, var(--share-bar-rule, 1px solid currentColor));
    font-size: var(--share-bar-size, 16px);
    line-height: var(--share-bar-line-height, 1.5);
    font-weight: var(--share-bar-weight, 700);
}

.share-bar-item {
    position: relative;
    width: var(--share-bar-item-width, auto);
    margin-top: var(--share-bar-item-margin-top, 0);
    text-align: var(--share-bar-item-align, left);
}

.share-bar-link {
    display: inline-block;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    line-height: inherit;
    color: var(--share-bar-color, inherit);
    text-align: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.share-bar-link:hover,
.share-bar-link:focus-visible {
    color: var(--share-bar-hover-color, var(--color-primary));
}

.share-bar-icon {
    display: inline-block;
    position: relative;
    width: auto;
    height: var(--share-bar-icon-height, 30px);
    margin-right: var(--share-bar-icon-gap, 8px);
}

.share-bar-label {
    position: relative;
    top: var(--share-bar-label-offset, 0);
    font-family: var(--share-bar-label-font, inherit);
    font-size: var(--share-bar-label-size, inherit);
    font-weight: var(--share-bar-label-weight, inherit);
    text-transform: var(--share-bar-label-transform, none);
}

/* Share popover: a white bubble with an arrow, above the share action */
.share-bar-popover {
    position: absolute;
    z-index: 5;
    top: var(--share-bar-popover-top, -80px);
    left: var(--share-bar-popover-left, 50%);
    width: var(--share-bar-popover-width, 220px);
    padding: var(--share-bar-popover-padding, 10px 0 0);
    transform: translateX(-50%);
    background: var(--share-bar-popover-bg, #fff);
    border-radius: var(--share-bar-popover-radius, 8px);
    box-shadow: var(--share-bar-popover-shadow, 0 1px 10px 5px rgba(0, 0, 0, 0.1));
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.share-bar-popover::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -20px;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-top-color: var(--share-bar-popover-bg, #fff);
}

.share-bar-item--share.is-open .share-bar-popover {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Optional close button (share.closeLabel) in the popover's top right corner. */
.share-bar-popover-close {
    position: absolute;
    top: var(--share-bar-popover-close-top, 6px);
    right: var(--share-bar-popover-close-right, 8px);
    padding: 0;
    border: 0;
    background: none;
    color: var(--share-bar-popover-close-color, inherit);
    font: inherit;
    font-size: var(--share-bar-popover-close-size, 20px);
    line-height: 1;
    cursor: pointer;
}

.share-bar-popover-link {
    display: inline-block;
    width: var(--share-bar-popover-link-size, 40px);
    height: var(--share-bar-popover-link-size, 40px);
    margin: var(--share-bar-popover-link-margin, 5px);
    color: inherit;
}

.share-bar-popover-link img {
    display: inline-block;
    margin: var(--share-bar-popover-icon-margin, 0);
}

@media print {
    .share-bar {
        display: none;
    }
}

/* --- opt-in print.pdf: the button while the PDF is made, and the status line --- */
.share-bar-link.is-loading {
    cursor: progress;
    opacity: var(--share-bar-loading-opacity, 0.6);
}

.share-bar-status {
    margin: 4px 0 0;
    font-size: var(--share-bar-status-size, 13px);
}

/* empty, the status line takes no room but stays in the accessibility tree, so screen readers announce
   what is written into it later (a display:none live region is never announced) */
.share-bar-status:empty {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
