/* Share component — trigger + capsule-pill panel.
   See ./README.md for usage. */

.share {
    position: relative;
    display: inline-block;
}

.share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.8rem;
    height: 2rem;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 1px solid var(--share-border, rgba(0, 0, 0, 0.18));
    border-radius: 999px;
    cursor: pointer;
    color: inherit;
    font: inherit;
    font-size: 0.85rem;
    font-weight: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    vertical-align: middle;
    transition: background 0.15s, border-color 0.15s;
}
.share-trigger:hover {
    background: var(--share-hover-bg, rgba(0, 0, 0, 0.04));
    border-color: var(--share-border-hover, rgba(0, 0, 0, 0.35));
}
.share-trigger svg {
    flex: none;
    width: 16px;
    height: 16px;
    display: block;
}

/* Round icon-only trigger — add class="share-trigger share-trigger--round" */
.share-trigger--round {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.share-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--share-panel-bg, #fff);
    border: 1px solid var(--share-border, #ccc);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    padding: 6px;
    z-index: 20;
    display: flex;
    flex-direction: row;
    gap: 4px;
    white-space: nowrap;
}

.share-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    border-radius: 999px;
    font: inherit;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}
.share-action:hover {
    background: var(--share-action-hover-bg, #f0f0f0);
    border-color: var(--share-action-hover-border, #ddd);
}
.share-action .share-icon {
    display: inline-flex;
    align-items: center;
}
.share-action .share-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

@media (max-width: 600px) {
    .share-panel {
        position: fixed;
        top: auto;
        bottom: 14px;
        left: 12px;
        right: 12px;
        justify-content: center;
        flex-wrap: wrap;
        row-gap: 4px;
        border-radius: 20px;
    }
    .share-action {
        padding: 6px 10px;
        font-size: 0.68rem;
    }
}
