/* ─────────────────────────────────────────────────────────────────────
 * lyra-bt-social-share.css
 *
 * Styles for two blocks:
 *   - social_share_bar  → .lyra-bt-ssh.*
 *   - click_to_tweet    → .lyra-bt-ctt.*
 *
 * Design philosophy: zero-weight. No web fonts, no external images, no
 * @import. All variants encoded as class modifiers so the renderer can
 * stay generic. Inline styles only carry per-instance CSS variables.
 * ───────────────────────────────────────────────────────────────────── */

/* ═════════════════════════════════════════════════════════════════════
 * Social Share Bar
 * ═════════════════════════════════════════════════════════════════════ */

.lyra-bt-ssh {
    --lyra-bt-ssh-gap: 8px;
    --lyra-bt-ssh-pad-v: 12px;
    --lyra-bt-ssh-pad-h: 0px;
    --lyra-bt-ssh-bg: transparent;
    --lyra-bt-ssh-sticky-top: 100px;
    --lyra-bt-ssh-mono-bg: #0f172a;
    --lyra-bt-ssh-mono-fg: #ffffff;
    --lyra-bt-ssh-brand: #0f172a; /* per-button override via inline style */
    box-sizing: border-box;
    background: var(--lyra-bt-ssh-bg);
    padding: var(--lyra-bt-ssh-pad-v) var(--lyra-bt-ssh-pad-h);
}
.lyra-bt-ssh *, .lyra-bt-ssh *::before, .lyra-bt-ssh *::after { box-sizing: border-box; }

.lyra-bt-ssh--bounded { max-width: var(--lyra-bt-ssh-max-w, 100%); }

/* Inner row — flex container for buttons.
 * Inline mode: horizontal. Sticky mode: vertical. */
.lyra-bt-ssh__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--lyra-bt-ssh-gap);
}

/* ── Mode: inline ─────────────────────────────────────────────────── */
.lyra-bt-ssh--mode-inline.lyra-bt-ssh--align-left   .lyra-bt-ssh__inner { justify-content: flex-start;  }
.lyra-bt-ssh--mode-inline.lyra-bt-ssh--align-center .lyra-bt-ssh__inner { justify-content: center;      }
.lyra-bt-ssh--mode-inline.lyra-bt-ssh--align-right  .lyra-bt-ssh__inner { justify-content: flex-end;    }

/* ── Mode: sticky ─────────────────────────────────────────────────── */
.lyra-bt-ssh--mode-sticky {
    position: sticky;
    top: var(--lyra-bt-ssh-sticky-top);
    align-self: flex-start;
    z-index: 50;
    padding: 0;
}
.lyra-bt-ssh--mode-sticky .lyra-bt-ssh__inner {
    flex-direction: column;
    align-items: flex-start;
}
.lyra-bt-ssh--mode-sticky.lyra-bt-ssh--sticky-right .lyra-bt-ssh__inner { align-items: flex-end; }

/* ── Button base ──────────────────────────────────────────────────── */
.lyra-bt-ssh__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
    border: 0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    position: relative;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
}
.lyra-bt-ssh__btn:hover { transform: translateY(-1px); text-decoration: none; }
.lyra-bt-ssh__btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.lyra-bt-ssh__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.lyra-bt-ssh__icon svg { width: 1em; height: 1em; display: block; }

.lyra-bt-ssh__label {
    white-space: nowrap;
    line-height: 1.2;
}

/* "Copied!" toast appended next to copy-link button when JS fires.
 * The JS toggles a .is-copied class on the button. */
.lyra-bt-ssh__copied {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 3px 9px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.lyra-bt-ssh__copied::before { content: 'Copied!'; }
.lyra-bt-ssh__btn.is-copied .lyra-bt-ssh__copied {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Size: small / medium / large ─────────────────────────────────── */
.lyra-bt-ssh--size-sm .lyra-bt-ssh__btn { font-size: 14px; }
.lyra-bt-ssh--size-md .lyra-bt-ssh__btn { font-size: 16px; }
.lyra-bt-ssh--size-lg .lyra-bt-ssh__btn { font-size: 18px; }

/* Icon-only buttons get a fixed square footprint sized by font-size.
 * Buttons with labels get auto width + padding. */
.lyra-bt-ssh--labels-no .lyra-bt-ssh__btn {
    width: 2.5em;
    height: 2.5em;
    padding: 0;
    aspect-ratio: 1;
}
.lyra-bt-ssh--labels-no .lyra-bt-ssh__label { display: none; }

.lyra-bt-ssh--labels-yes .lyra-bt-ssh__btn {
    padding: 0.55em 1em;
    min-height: 2.5em;
}

/* ── Shape: filled circle ─────────────────────────────────────────── */
.lyra-bt-ssh--shape-circle .lyra-bt-ssh__btn { border-radius: 999px; }

/* ── Shape: rounded square ────────────────────────────────────────── */
.lyra-bt-ssh--shape-rounded-square .lyra-bt-ssh__btn { border-radius: 0.45em; }

/* ── Shape: bare icon (no background) ─────────────────────────────── */
.lyra-bt-ssh--shape-bare .lyra-bt-ssh__btn {
    background: transparent !important;
    color: var(--lyra-bt-ssh-brand);
    border-radius: 6px;
}
.lyra-bt-ssh--shape-bare.lyra-bt-ssh--color-monochrome .lyra-bt-ssh__btn {
    color: var(--lyra-bt-ssh-mono-bg);
}
.lyra-bt-ssh--shape-bare .lyra-bt-ssh__btn:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}

/* ── Color: brand (per-platform color via inline --lyra-bt-ssh-brand) ─── */
.lyra-bt-ssh--color-brand.lyra-bt-ssh--shape-circle .lyra-bt-ssh__btn,
.lyra-bt-ssh--color-brand.lyra-bt-ssh--shape-rounded-square .lyra-bt-ssh__btn {
    background: var(--lyra-bt-ssh-brand);
    color: #fff;
}
.lyra-bt-ssh--color-brand.lyra-bt-ssh--shape-circle .lyra-bt-ssh__btn:hover,
.lyra-bt-ssh--color-brand.lyra-bt-ssh--shape-rounded-square .lyra-bt-ssh__btn:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ── Color: monochrome (single color across all platforms) ────────── */
.lyra-bt-ssh--color-monochrome.lyra-bt-ssh--shape-circle .lyra-bt-ssh__btn,
.lyra-bt-ssh--color-monochrome.lyra-bt-ssh--shape-rounded-square .lyra-bt-ssh__btn {
    background: var(--lyra-bt-ssh-mono-bg);
    color: var(--lyra-bt-ssh-mono-fg);
}
.lyra-bt-ssh--color-monochrome.lyra-bt-ssh--shape-circle .lyra-bt-ssh__btn:hover,
.lyra-bt-ssh--color-monochrome.lyra-bt-ssh--shape-rounded-square .lyra-bt-ssh__btn:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ── Admin-only empty state ───────────────────────────────────────── */
.lyra-bt-ssh--empty {
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px dashed #d97706;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
}

/* ── Mobile behaviors for sticky mode ─────────────────────────────── */
@media (max-width: 767px) {
    /* Hide on mobile */
    .lyra-bt-ssh--mode-sticky.lyra-bt-ssh--mobile-hide { display: none; }

    /* Bottom bar on mobile — fixed bottom strip, full width.
     * Buttons rearrange to horizontal centered row. */
    .lyra-bt-ssh--mode-sticky.lyra-bt-ssh--mobile-bottom-bar {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        padding: 10px 12px env(safe-area-inset-bottom, 10px);
        box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.08);
    }
    .lyra-bt-ssh--mode-sticky.lyra-bt-ssh--mobile-bottom-bar .lyra-bt-ssh__inner {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    /* Labels in the bottom bar collide with limited horizontal space —
     * force icon-only display regardless of the labels setting. */
    .lyra-bt-ssh--mode-sticky.lyra-bt-ssh--mobile-bottom-bar .lyra-bt-ssh__label {
        display: none;
    }
    .lyra-bt-ssh--mode-sticky.lyra-bt-ssh--mobile-bottom-bar .lyra-bt-ssh__btn {
        width: 2.5em;
        height: 2.5em;
        padding: 0;
    }

    /* Side rail on mobile — keep the sticky-side behavior but make
     * the icons smaller. May overlap content; admin opt-in only. */
    .lyra-bt-ssh--mode-sticky.lyra-bt-ssh--mobile-side-rail {
        font-size: 14px;
    }
}

/* ═════════════════════════════════════════════════════════════════════
 * Click-to-Tweet
 * ═════════════════════════════════════════════════════════════════════ */

.lyra-bt-ctt {
    --lyra-bt-ctt-pad-v: 32px;
    --lyra-bt-ctt-pad-h: 32px;
    --lyra-bt-ctt-radius: 14px;
    --lyra-bt-ctt-accent: #1da1f2;
    --lyra-bt-ctt-bg: #f1f5f9;
    --lyra-bt-ctt-text: #0f172a;
    --lyra-bt-ctt-muted: #64748b;
    --lyra-bt-ctt-btn-fg: #ffffff;
    box-sizing: border-box;
    margin: 24px 0;
    padding: var(--lyra-bt-ctt-pad-v) var(--lyra-bt-ctt-pad-h);
    color: var(--lyra-bt-ctt-text);
    border-radius: var(--lyra-bt-ctt-radius);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    position: relative;
}
.lyra-bt-ctt *, .lyra-bt-ctt *::before, .lyra-bt-ctt *::after { box-sizing: border-box; }
.lyra-bt-ctt--bounded { max-width: var(--lyra-bt-ctt-max-w); margin-left: auto; margin-right: auto; }

.lyra-bt-ctt__quote {
    margin: 0;
    padding: 0;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--lyra-bt-ctt-text);
    quotes: '"' '"' "'" "'";
}

.lyra-bt-ctt__author {
    display: block;
    margin-top: 14px;
    color: var(--lyra-bt-ctt-muted);
    font-style: italic;
    font-size: 0.85em;
}

.lyra-bt-ctt__btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding: 12px 20px;
    background: var(--lyra-bt-ctt-accent);
    color: var(--lyra-bt-ctt-btn-fg);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: 0.005em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.lyra-bt-ctt__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(29, 161, 242, 0.32);
    text-decoration: none;
    color: var(--lyra-bt-ctt-btn-fg);
}
.lyra-bt-ctt__btn:focus-visible {
    outline: 2px solid var(--lyra-bt-ctt-accent);
    outline-offset: 3px;
}
.lyra-bt-ctt__btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.lyra-bt-ctt__btn-icon svg { width: 14px; height: 14px; display: block; }

/* ── Sizes ────────────────────────────────────────────────────────── */
.lyra-bt-ctt--size-sm .lyra-bt-ctt__quote { font-size: 17px;    }
.lyra-bt-ctt--size-md .lyra-bt-ctt__quote { font-size: 22px;    }
.lyra-bt-ctt--size-lg .lyra-bt-ctt__quote { font-size: 28px;    }

/* ── Alignment ────────────────────────────────────────────────────── */
.lyra-bt-ctt--align-left   { text-align: left;   }
.lyra-bt-ctt--align-center { text-align: center; }
.lyra-bt-ctt--align-right  { text-align: right;  }

/* ── Visual Style: pull_quote ─────────────────────────────────────── */
/* Decorative large quotation marks via pseudo-elements (no DOM bloat).
 * Pull-quote style has minimal frame — just the quote, the marks, the
 * author, and the button. Background is transparent. */
.lyra-bt-ctt--style-pull-quote {
    background: transparent;
    padding-left: max(var(--lyra-bt-ctt-pad-h), 56px);
    padding-right: max(var(--lyra-bt-ctt-pad-h), 28px);
    border-left: 3px solid var(--lyra-bt-ctt-accent);
    border-radius: 0;
}
.lyra-bt-ctt--style-pull-quote .lyra-bt-ctt__quote {
    position: relative;
}
.lyra-bt-ctt--style-pull-quote .lyra-bt-ctt__quote::before {
    content: '“';
    position: absolute;
    left: -42px;
    top: -0.3em;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 4em;
    color: var(--lyra-bt-ctt-accent);
    line-height: 1;
    opacity: 0.5;
    pointer-events: none;
}
.lyra-bt-ctt--style-pull-quote.lyra-bt-ctt--align-center { padding-left: var(--lyra-bt-ctt-pad-h); border-left: 0; }
.lyra-bt-ctt--style-pull-quote.lyra-bt-ctt--align-center .lyra-bt-ctt__quote::before {
    position: static;
    display: block;
    text-align: center;
    margin-bottom: -0.4em;
}
.lyra-bt-ctt--style-pull-quote.lyra-bt-ctt--align-right { padding-left: var(--lyra-bt-ctt-pad-h); padding-right: max(var(--lyra-bt-ctt-pad-h), 56px); border-left: 0; border-right: 3px solid var(--lyra-bt-ctt-accent); }
.lyra-bt-ctt--style-pull-quote.lyra-bt-ctt--align-right .lyra-bt-ctt__quote::before {
    left: auto;
    right: -42px;
    content: '”';
}

/* ── Visual Style: colored_panel ──────────────────────────────────── */
/* Full accent-tinted card. Background uses the bg_color, with an
 * accent-color border accent at the top for visual punch. */
.lyra-bt-ctt--style-colored-panel {
    background: var(--lyra-bt-ctt-bg);
    border-top: 4px solid var(--lyra-bt-ctt-accent);
}

/* ── Visual Style: minimalist ─────────────────────────────────────── */
/* No quote marks, no frame, no background — just text + button.
 * Use case: sidebar callout that should not compete with surrounding
 * content. The button is the only visual decoration. */
.lyra-bt-ctt--style-minimalist {
    background: transparent;
    padding: 16px 0;
    border-radius: 0;
}
.lyra-bt-ctt--style-minimalist .lyra-bt-ctt__quote {
    font-weight: 500;
}

/* ── Admin-only empty state ───────────────────────────────────────── */
.lyra-bt-ctt--empty {
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px dashed #d97706;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
}
