/*! Boholweb Social Media Share Buttons 1.0.1 — Copyright (c) 2026 BoholwebWP (https://boholwebwp.com) — MIT License */

/* Templates can change these on .bwsb (or :root). */
.bwsb {
    --bwsb-gap: .5rem;
    --bwsb-radius: .5rem;
    --bwsb-height: 2.5rem;
    --bwsb-pad: .9rem;
    --bwsb-icon: 1.15rem;
    --bwsb-font: .9rem;
    --bwsb-custom: #1f2937;
    --bwsb-mono-bg: #eef1f5;
    --bwsb-mono-fg: #1f2937;
    --bwsb-heading: inherit;
    --bwsb-focus: #2563eb;
    --bwsb-c: #475569;

    margin: 1.75rem 0;
    font-size: var(--bwsb-font);
    line-height: 1.2;
}

.bwsb .bwsb-heading {
    margin: 0 0 .6rem;
    font-size: .95em;
    font-weight: 600;
    color: var(--bwsb-heading);
}

.bwsb .bwsb-list,
.bwsb .bwsb-more-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bwsb-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bwsb .bwsb-item {
    position: relative;
    display: flex;
    margin: 0;
    padding: 0;
}
.bwsb .bwsb-item[hidden] { display: none; }
.bwsb .bwsb-item::before,
.bwsb .bwsb-item::marker { content: none; }

.bwsb-align-center .bwsb-list { justify-content: center; }
.bwsb-align-center .bwsb-heading,
.bwsb-align-center .bwsb-total { text-align: center; }
.bwsb-align-right .bwsb-list { justify-content: flex-end; }
.bwsb-align-right .bwsb-heading,
.bwsb-align-right .bwsb-total { text-align: right; }
.bwsb-align-stretch .bwsb-list > .bwsb-item { flex: 1 1 0; min-width: max-content; }
.bwsb-align-stretch .bwsb-list > .bwsb-item > .bwsb-btn { width: 100%; justify-content: center; }

/* Buttons — reset whatever the template does to links and buttons. */
.bwsb .bwsb-btn {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: var(--bwsb-height);
    min-width: var(--bwsb-height);
    margin: 0;
    padding: 0 var(--bwsb-pad);
    border: 2px solid transparent;
    border-radius: var(--bwsb-radius);
    background: var(--bwsb-c);
    color: #fff;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.bwsb .bwsb-btn:hover { filter: brightness(1.1); transform: translateY(-1px); color: #fff; text-decoration: none; }
.bwsb .bwsb-btn:active { transform: translateY(0); }
.bwsb .bwsb-btn:focus { outline: none; }
.bwsb .bwsb-btn:focus-visible {
    outline: 3px solid var(--bwsb-focus);
    outline-offset: 2px;
}

.bwsb .bwsb-icon {
    flex: none;
    width: var(--bwsb-icon);
    height: var(--bwsb-icon);
    display: block;
}
.bwsb .bwsb-label { display: inline-block; }
.bwsb .bwsb-count {
    margin-left: .1rem;
    padding: .15rem .4rem;
    border-radius: 999px;
    background: rgb(255 255 255 / .22);
    font-size: .8em;
    font-variant-numeric: tabular-nums;
}

/* Sizes */
.bwsb-size-sm { --bwsb-height: 2rem; --bwsb-pad: .65rem; --bwsb-icon: .95rem; --bwsb-font: .8rem; --bwsb-gap: .375rem; }
.bwsb-size-lg { --bwsb-height: 3rem; --bwsb-pad: 1.15rem; --bwsb-icon: 1.35rem; --bwsb-font: 1rem; --bwsb-gap: .625rem; }

/* Shapes */
.bwsb-shape-square { --bwsb-radius: 0; }
.bwsb-shape-pill,
.bwsb-shape-circle { --bwsb-radius: 999px; }
.bwsb-shape-circle .bwsb-list > .bwsb-item > .bwsb-btn,
.bwsb-labels-icons .bwsb-list > .bwsb-item > .bwsb-btn { padding: 0; width: var(--bwsb-height); }
.bwsb-shape-circle.bwsb-labels-icons_labels .bwsb-list > .bwsb-item > .bwsb-btn,
.bwsb-shape-circle.bwsb-labels-labels .bwsb-list > .bwsb-item > .bwsb-btn { width: auto; padding: 0 var(--bwsb-pad); }
.bwsb-labels-icons .bwsb-list > .bwsb-item > .bwsb-btn .bwsb-count { position: absolute; top: -.45rem; right: -.45rem; background: #111827; color: #fff; }
.bwsb-labels-labels .bwsb-icon,
.bwsb-labels-icons .bwsb-list > .bwsb-item > .bwsb-btn .bwsb-label { display: none; }
.bwsb-align-stretch.bwsb-labels-icons .bwsb-list > .bwsb-item > .bwsb-btn,
.bwsb-align-stretch.bwsb-shape-circle .bwsb-list > .bwsb-item > .bwsb-btn { width: 100%; }

/* Looks */
.bwsb-look-outline .bwsb-btn {
    background: transparent;
    border-color: var(--bwsb-c);
    color: var(--bwsb-c);
}
.bwsb-look-outline .bwsb-btn:hover { background: var(--bwsb-c); color: #fff; filter: none; }
.bwsb-look-outline .bwsb-count { background: color-mix(in srgb, var(--bwsb-c) 14%, transparent); }

.bwsb-look-mono .bwsb-btn { background: var(--bwsb-mono-bg); color: var(--bwsb-mono-fg); }
.bwsb-look-mono .bwsb-btn:hover { background: var(--bwsb-c); color: #fff; filter: none; }
.bwsb-look-mono .bwsb-count { background: rgb(0 0 0 / .08); }

.bwsb-look-custom .bwsb-btn { background: var(--bwsb-custom); color: #fff; }
.bwsb-look-custom.bwsb .bwsb-more-list .bwsb-btn { background: var(--bwsb-custom); }

/* Network colours, darkened where needed so white text meets WCAG AA (4.5:1). */
.bwsb-facebook { --bwsb-c: #1269db; }
.bwsb-x { --bwsb-c: #0f1419; }
.bwsb-linkedin { --bwsb-c: #0a66c2; }
.bwsb-whatsapp { --bwsb-c: #0e8043; }
.bwsb-pinterest { --bwsb-c: #e60023; }
.bwsb-reddit { --bwsb-c: #d93a00; }
.bwsb-telegram { --bwsb-c: #15739f; }
.bwsb-messenger { --bwsb-c: #0866ff; }
.bwsb-threads { --bwsb-c: #101010; }
.bwsb-bluesky { --bwsb-c: #0a6fd8; }
.bwsb-mastodon { --bwsb-c: #563acc; }
.bwsb-tumblr { --bwsb-c: #36465d; }
.bwsb-vk { --bwsb-c: #0067e0; }
.bwsb-line { --bwsb-c: #04813a; }
.bwsb-viber { --bwsb-c: #6650d9; }
.bwsb-weibo { --bwsb-c: #d1132a; }
.bwsb-xing { --bwsb-c: #006567; }
.bwsb-hackernews { --bwsb-c: #c44f00; }
.bwsb-email { --bwsb-c: #4b5563; }
.bwsb-sms { --bwsb-c: #15803d; }
.bwsb-copy { --bwsb-c: #334155; }
.bwsb-print { --bwsb-c: #475569; }
.bwsb-native { --bwsb-c: #0f766e; }
.bwsb-more-toggle { --bwsb-c: #64748b; }

/* "Share" uses the device share sheet: only shown where the browser has one (share.js adds the class). */
.bwsb .bwsb-item-native { display: none; }
.bwsb-can-share .bwsb .bwsb-item-native { display: flex; }

/* Copied state */
.bwsb .bwsb-btn.bwsb-done { background: #15803d; border-color: #15803d; color: #fff; }

/* "More" menu */
.bwsb .bwsb-more-list {
    position: absolute;
    z-index: 50;
    top: calc(100% + .4rem);
    left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: .3rem;
    min-width: 12rem;
    padding: .45rem;
    border: 1px solid rgb(0 0 0 / .1);
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 10px 30px rgb(15 23 42 / .18);
}
.bwsb .bwsb-more-list[hidden] { display: none; }
.bwsb-align-right .bwsb-more-list { left: auto; right: 0; }
.bwsb .bwsb-more-list .bwsb-item { width: 100%; }
.bwsb .bwsb-more-list .bwsb-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0 .75rem;
    border-radius: .45rem;
}

.bwsb .bwsb-total {
    margin: .6rem 0 0;
    font-size: .9em;
    color: inherit;
    opacity: .85;
}
.bwsb .bwsb-total strong { font-variant-numeric: tabular-nums; }

/* Live message ("Link copied") */
.bwsb .bwsb-status {
    display: block;
    min-height: 0;
    margin: 0;
    font-size: .85em;
}
.bwsb .bwsb-status:not(:empty) { margin-top: .5rem; }

/* Floating bar */
.bwsb.bwsb-floating {
    position: fixed;
    z-index: 999;
    top: 50%;
    margin: 0;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    transform: translateY(-50%);
}
.bwsb.bwsb-floating-left { left: 0; }
.bwsb.bwsb-floating-right { right: 0; }
.bwsb.bwsb-floating .bwsb-list { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.bwsb.bwsb-floating .bwsb-btn { border-radius: 0; }
.bwsb.bwsb-floating .bwsb-btn:hover { transform: none; }
.bwsb.bwsb-floating .bwsb-count { display: none; }
/* Round the bar itself, so hidden buttons (e.g. Share on computers) never leave a square end. */
.bwsb.bwsb-floating .bwsb-list { overflow: hidden; }
.bwsb.bwsb-floating-left .bwsb-list { border-radius: 0 var(--bwsb-radius) var(--bwsb-radius) 0; }
.bwsb.bwsb-floating-right .bwsb-list { border-radius: var(--bwsb-radius) 0 0 var(--bwsb-radius); }
.bwsb.bwsb-floating .bwsb-btn:focus-visible { outline-offset: -3px; }
.bwsb.bwsb-floating-left.bwsb-shape-circle .bwsb-list,
.bwsb.bwsb-floating-right.bwsb-shape-circle .bwsb-list { gap: .35rem; padding: .35rem; overflow: visible; border-radius: 0; }
.bwsb.bwsb-floating.bwsb-shape-circle .bwsb-btn { border-radius: 999px; }
.bwsb.bwsb-floating .bwsb-total {
    box-sizing: border-box;
    width: var(--bwsb-height);
    margin: .3rem 0 0;
    padding: .3rem .1rem;
    background: #fff;
    box-shadow: 0 1px 6px rgb(15 23 42 / .15);
    color: #1f2937;
    font-size: .62rem;
    line-height: 1.15;
    text-align: center;
    opacity: 1;
}
.bwsb.bwsb-floating-left .bwsb-total { border-radius: 0 .4rem .4rem 0; }
.bwsb.bwsb-floating-right .bwsb-total { border-radius: .4rem 0 0 .4rem; }
.bwsb.bwsb-floating .bwsb-total strong { display: block; font-size: .8rem; }
.bwsb.bwsb-floating .bwsb-status {
    position: absolute;
    top: 100%;
    left: 0;
    padding: .25rem .5rem;
    border-radius: .35rem;
    background: #111827;
    color: #fff;
    white-space: nowrap;
}
.bwsb.bwsb-floating-right .bwsb-status { left: auto; right: 0; }
.bwsb.bwsb-floating .bwsb-status:empty { display: none; }

@media (max-width: 767px) {
    .bwsb.bwsb-floating { display: none; }
    .bwsb.bwsb-floating.bwsb-mobile-bar {
        display: block;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        padding-bottom: env(safe-area-inset-bottom, 0);
        background: #fff;
        box-shadow: 0 -2px 12px rgb(15 23 42 / .15);
    }
    .bwsb.bwsb-floating.bwsb-mobile-bar { display: flex; align-items: stretch; overflow: visible; }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-list {
        flex: 1 1 auto;
        flex-direction: row;
        gap: 0;
        min-width: 0;
        padding: 0;
        overflow-x: auto;
        border-radius: 0;
        scrollbar-width: none;
    }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-list::-webkit-scrollbar { display: none; }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-item { flex: 1 0 2.75rem; }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-total {
        display: flex;
        flex-direction: column;
        justify-content: center;
        order: -1;
        width: auto;
        margin: 0;
        padding: 0 .6rem;
        border-radius: 0;
        box-shadow: inset -1px 0 rgb(15 23 42 / .12);
        white-space: nowrap;
    }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-item .bwsb-btn { width: 100%; border-radius: 0; }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-status { top: auto; bottom: 100%; left: 50%; transform: translateX(-50%); }
    .bwsb.bwsb-floating.bwsb-mobile-bar .bwsb-count { display: none; }
    body:has(.bwsb-mobile-bar) { padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bwsb .bwsb-btn { transition: none; }
    .bwsb .bwsb-btn:hover { transform: none; }
}

@media (prefers-color-scheme: dark) {
    .bwsb { --bwsb-mono-bg: #2a303a; --bwsb-mono-fg: #e5e7eb; }
    .bwsb .bwsb-more-list { background: #1f2430; border-color: rgb(255 255 255 / .12); }
    .bwsb.bwsb-floating.bwsb-mobile-bar { background: #1f2430; }
    .bwsb.bwsb-floating .bwsb-total { background: #1f2430; color: #e5e7eb; }
    .bwsb-look-outline .bwsb-x,
    .bwsb-look-outline .bwsb-threads { --bwsb-c: #e5e7eb; }
    .bwsb-look-outline .bwsb-x:hover,
    .bwsb-look-outline .bwsb-threads:hover { color: #0f1419; }
}

@media print {
    .bwsb { display: none !important; }
}
