/* ============================================
   SHARE COMPONENT v3.1 — Fixed Dropdown Position
   ============================================ */

/* ── Dropdown (product header action) ── */
.share-dd {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    overflow: visible !important;
    z-index: 2147482000 !important;
    isolation: isolate !important;
}

.share-dd.is-open {
    z-index: 2147483000 !important;
}

.share-dd-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    background: rgba(255,255,255,0.1) !important;
    color: rgba(255,255,255,0.8) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.share-dd-toggle:hover {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}

.share-dd-toggle svg {
    flex-shrink: 0;
}

/*
   IMPORTANT FIX:
   This panel must be absolute, not fixed.
   It is now positioned from .share-dd itself.
*/
.share-dd-panel {
    display: block;
    position: absolute !important;

    /* Kill wrong inline Popper/Bootstrap inset */
    inset: unset !important;

    /* Final correct placement */
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: auto !important;

    transform: none !important;
    margin: 0 !important;

    z-index: 2147483000 !important;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 24px));

    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/*
   Extra override for inline styles like:
   display: block;
   position: fixed;
   z-index: 99999;
   inset: 215px 298px auto auto;
*/
.share-dd-panel[style] {
position: absolute !important;
    inset: unset !important;
    top: calc(100% + -100px) !important;
    right: 60px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
}

.share-dd-panel[style*="block"],
.share-dd.is-open .share-dd-panel,
.share-dd-panel.show,
.share-dd-panel.active,
.share-dd-panel.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.share-dd-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 14px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.share-dd-header span {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.share-dd-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    border: none !important;
    background: transparent !important;
    color: #9ca3af !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    padding: 0 !important;
}

.share-dd-close:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

.share-dd-btns {
    padding: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
}

.share-dd-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 8px 12px !important;
    border: none !important;
    background: transparent !important;
    color: #374151 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    font-family: inherit !important;
    text-align: left !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
}

.share-dd-btn:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

.share-dd-btn svg {
    flex-shrink: 0 !important;
    width: 16px !important;
    height: 16px !important;
}

.share-dd-btn span {
    line-height: 1 !important;
}

.share-dd-copy.share-copied {
    background: #f0fdf4 !important;
    color: #16a34a !important;
}

@media (max-width: 768px) {
    .share-dd-panel {
        min-width: 180px;
        max-width: calc(100vw - 24px);
        right: 0 !important;
        left: auto !important;
    }
}

/* ── Minimal Bar (blog detail) ── */
.share-min {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 0;
}

.share-min-btns {
    display: flex;
    gap: 6px;
}

.share-min-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.share-min-btn:hover {
    transform: translateY(-1px);
    color: #fff;
}

.share-min-btn svg {
    flex-shrink: 0;
}

.share-min-fb:hover {
    background: #1877F2;
}

.share-min-tw:hover {
    background: #000;
}

.share-min-li:hover {
    background: #0A66C2;
}

.share-min-wa:hover {
    background: #25D366;
}

.share-min-em:hover {
    background: #EA4335;
}

.share-min-copy:hover {
    background: #6c757d;
}

.share-min-copy.share-copied {
    background: #28a745 !important;
    color: #fff !important;
    transform: translateY(-2px);
}

/* ── Pill Style (cards, inline) ── */
.share-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    width: fit-content;
}

.share-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.share-pill-btn:hover {
    color: #fff;
}

.share-pill-fb:hover {
    background: #1877F2;
}

.share-pill-tw:hover {
    background: #000;
}

.share-pill-li:hover {
    background: #0A66C2;
}

.share-pill-wa:hover {
    background: #25D366;
}

.share-pill-em:hover {
    background: #EA4335;
}

.share-pill-copy:hover {
    background: #6c757d;
}

.share-pill-copy.share-copied {
    background: #28a745 !important;
    color: #fff !important;
}

/* ── Toast ── */
.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2147483000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    white-space: nowrap;
}
.share-dd-panel[style]
.share-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.share-toast .material-symbols-outlined {
    font-size: 16px;
    color: #28a745;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .share-min {
        padding: 12px 16px;
        border-radius: 10px;
    }

    .share-min-btn {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .share-min-btn svg {
        width: 14px;
        height: 14px;
    }

    .share-pill-btn {
        width: 28px;
        height: 28px;
    }

    .share-pill-btn svg {
        width: 12px;
        height: 12px;
    }
}
