/**
 * Single Share button + menu (SocialShare widget, share_mode=single; paired with
 * sync-broker-share.js). States are written on the same selectors so theme
 * [type=button] hover/focus rules do not restyle the toggle or menu items; the
 * widget's {{WRAPPER}} controls out-specify these defaults.
 */
.sb-share {
    position: relative;
    display: inline-block;
}

.sb-share .sb-share__toggle,
.sb-share .sb-share__toggle:hover,
.sb-share .sb-share__toggle:focus,
.sb-share .sb-share__toggle:active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #ddd8c4;
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}

.sb-share .sb-share__toggle:hover {
    background: #f5f5f0;
}

.sb-share .sb-share__toggle:focus-visible,
.sb-share .sb-share__item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.sb-share__icon {
    display: inline-flex;
}

.sb-share__icon svg {
    width: 1em;
    height: 1em;
}

.sb-share__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    min-width: 200px;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.sb-share__menu[hidden] {
    display: none;
}

.sb-share .sb-share__item,
.sb-share .sb-share__item:hover,
.sb-share .sb-share__item:focus,
.sb-share .sb-share__item:active {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
}

.sb-share .sb-share__item:hover {
    background: #f5f5f0;
}

.sb-share__item i {
    width: 1.1em;
    text-align: center;
}

/* SMS only makes sense on touch-sized screens; independent of Tailwind's md:sb-hidden and load order. */
@media (min-width: 768px) {
    .sb-share .sb-share__item.sb-share__item--sms,
    .sb-share .sb-share__item.sb-share__item--sms:hover,
    .sb-share .sb-share__item.sb-share__item--sms:focus,
    .sb-share .sb-share__item.sb-share__item--sms:active {
        display: none;
    }
}
