/**
 * Single-post share blocks — unified layout & resets for all templates / share styles.
 * LTR/RTL: logical margins/padding, text-align: start on title, flex uses document direction.
 * Overrides legacy .sharing rules in style.css (line-height, borders, width).
 */

body.single-post article.post-entry.post-entry-custom .sharing,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    line-height: 1.45;
    color: var(--ahura-c-text-primary);
}

body.single-post article.post-entry.post-entry-custom .sharing:not(.ah-share-buttons-3),
body.single-post article.post-entry.post-entry-custom .ah-share-buttons:not(.ah-share-buttons-3) {
    direction: inherit;
}

/* Share style 3: match site locale (theme base CSS is RTL; LTR sites need explicit ltr here) */
html[dir="ltr"] body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3,
html[dir="ltr"] body.single-post article.post-entry.post-entry-custom .ah-share-buttons.ah-share-buttons-3 {
    direction: ltr;
}

html[dir="rtl"] body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3,
html[dir="rtl"] body.single-post article.post-entry.post-entry-custom .ah-share-buttons.ah-share-buttons-3 {
    direction: rtl;
}

body.mw_ltr body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3,
body.mw_ltr body.single-post article.post-entry.post-entry-custom .ah-share-buttons.ah-share-buttons-3 {
    direction: ltr;
}

body.mw_rtl body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3,
body.mw_rtl body.single-post article.post-entry.post-entry-custom .ah-share-buttons.ah-share-buttons-3 {
    direction: rtl;
}

/* Kill legacy pipe borders + tall line-height from style.css */
body.single-post article.post-entry.post-entry-custom .sharing,
body.single-post article.post-entry.post-entry-custom .sharing a {
    line-height: inherit;
}

body.single-post article.post-entry.post-entry-custom .sharing a {
    border: none !important;
    border-inline-end: none !important;
}

/* Style 1 — match card treatment used on other single layouts */
body.single-post .wrapper.single-post-template-1 article.post-entry.post-entry-custom .sharing,
body.single-post .wrapper.single-post-template-1 article.post-entry.post-entry-custom .ah-share-buttons {
    margin-top: 1.75rem;
    padding: clamp(14px, 2vw, 18px) clamp(12px, 2vw, 16px);
    border-radius: 14px;
    border: 1px solid rgba(var(--ahura-theme-primary-rgb), 0.12);
    background: rgba(var(--ahura-theme-primary-rgb), 0.04);
}

/* Style 1 — same row layout as style 2 */
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-1,
body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 16px;
    width: 100%;
}

/* Row: title + actions — logical start (left LTR / right RTL); .ah-sharing--center clusters in the middle */
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-2,
body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-2,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3,
body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 16px;
    width: 100%;
}

body.single-post article.post-entry.post-entry-custom .ah-share-buttons-1.ah-sharing--center,
body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-1.ah-sharing--center,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-2.ah-sharing--center,
body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-2.ah-sharing--center,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3.ah-sharing--center,
body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3.ah-sharing--center {
    justify-content: center;
}

body.single-post article.post-entry.post-entry-custom .ah-share-buttons .box-title,
body.single-post article.post-entry.post-entry-custom .sharing .box-title {
    flex: 0 1 auto;
    min-width: min(100%, 140px);
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ahura-c-text-primary);
    text-align: start;
    align-self: center;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

body.single-post article.post-entry.post-entry-custom .sharing.ah-sharing--center .box-title,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons.ah-sharing--center .box-title {
    text-align: center;
}

body.single-post article.post-entry.post-entry-custom .share-buttons-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    row-gap: 10px;
    column-gap: 10px;
    min-width: 0;
    flex: 0 1 auto;
    list-style: none;
    margin: 0;
    padding: 0;
    direction: inherit;
}

/* Separators between icons — vertical rule at half opacity (sits in the flex gap) */
body.single-post .sharing .share-buttons-list > a,
body.single-post .ah-share-buttons .share-buttons-list > a {
    position: relative;
}

body.single-post .sharing .share-buttons-list > a:not(:first-child)::before,
body.single-post .ah-share-buttons .share-buttons-list > a:not(:first-child)::before {
    content: '';
    position: absolute;
    inset-inline-start: -5px;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: color-mix(in srgb, var(--ahura-c-text-primary, #111) 28%, transparent);
    opacity: 0.5;
    pointer-events: none;
}

html:is(.ahura-dark-theme, .ahura-black-theme) body.single-post .sharing .share-buttons-list > a:not(:first-child)::before,
html:is(.ahura-dark-theme, .ahura-black-theme) body.single-post .ah-share-buttons .share-buttons-list > a:not(:first-child)::before {
    background: color-mix(in srgb, var(--ahura-c-text-primary, #fff) 22%, transparent);
}

/* Icon-only buttons (templates 1 & 2) */
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-1 .share-buttons-list > a,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-2 .share-buttons-list > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    border: 1px solid rgba(var(--ahura-theme-primary-rgb), 0.15);
    background: var(--ahura-c-bg-primary);
    color: var(--ahura-c-text-secondary);
    text-decoration: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

body.single-post article.post-entry.post-entry-custom .ah-share-buttons-1 .share-buttons-list > a:hover,
body.single-post article.post-entry.post-entry-custom .ah-share-buttons-2 .share-buttons-list > a:hover {
    transform: translateY(-2px);
    border-color: var(--ahura-theme-primary);
    color: var(--ahura-theme-primary);
    box-shadow: 0 6px 18px rgba(var(--ahura-theme-primary-rgb), 0.18);
}

body.single-post article.post-entry.post-entry-custom .share-buttons-list > a .ah-isax {
    font-size: 18px;
    line-height: 1;
}

body.single-post article.post-entry.post-entry-custom .share-buttons-list > a svg {
    width: 1.125em;
    height: 1.125em;
    flex-shrink: 0;
    display: block;
}

/* Template 3 — labeled chips (auto width, brand fills from share-buttons-3.css); alignment comes from Customizer utility classes */

body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3 .share-buttons-list > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    column-gap: 4px;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 34px;
    padding-block: 6px;
    padding-inline: 10px;
    margin: 0;
    border-radius: 11px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease,
        filter 0.15s ease;
}

body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3 .share-buttons-list > a:hover {
    transform: translateY(-1px);
    opacity: 0.97;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    filter: brightness(1.03);
}

body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3 .share-buttons-list > a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 3px;
}

body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3 .share-buttons-list > a span {
    white-space: nowrap;
    text-align: start;
}

/* Alignment customizer: Bootstrap justify-content on list still applies; keep buttons grouped */
body.single-post article.post-entry.post-entry-custom .share-buttons-list.justify-content-start {
    justify-content: flex-start;
}

body.single-post article.post-entry.post-entry-custom .share-buttons-list.justify-content-center {
    justify-content: center;
}

body.single-post article.post-entry.post-entry-custom .share-buttons-list.justify-content-end {
    justify-content: flex-end;
}

@media (max-width: 576px) {
    body.single-post article.post-entry.post-entry-custom .ah-share-buttons-1,
    body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-1,
    body.single-post article.post-entry.post-entry-custom .ah-share-buttons-2,
    body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-2,
    body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3,
    body.single-post article.post-entry.post-entry-custom .sharing.ah-share-buttons-3 {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    body.single-post article.post-entry.post-entry-custom .ah-share-buttons .box-title,
    body.single-post article.post-entry.post-entry-custom .sharing .box-title {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    body.single-post article.post-entry.post-entry-custom .share-buttons-list {
        width: 100%;
    }

    body.single-post article.post-entry.post-entry-custom .ah-share-buttons-3 .share-buttons-list > a {
        flex: 1 1 calc(50% - 6px);
        min-width: min(100%, calc(50% - 6px));
        justify-content: center;
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-post article.post-entry.post-entry-custom .share-buttons-list > a:hover {
        transform: none;
    }
}
