/**
 * Social Share Bar - Frontend Stylesheet
 * Fully Responsive, High Contrast & Complete Dark Mode Support
 */

:root {
    --ssb-whatsapp: #25D366;
    --ssb-telegram: #229ED9;
    --ssb-facebook: #1877F2;
    --ssb-linkedin: #0A66C2;
    --ssb-instagram: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    --ssb-instagram-solid: #E1306C;
    --ssb-copy: #64748b;
}

/* Base Widget Container */
.ssb-widget-wrapper {
    margin: 40px 0 30px 0;
    clear: both;
    position: relative;
    font-family: inherit;
    box-sizing: border-box;
}

.ssb-widget-wrapper * {
    box-sizing: border-box;
}

/* Light Theme Card */
.ssb-widget-inner {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 10px 35px -10px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header */
.ssb-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
}

.ssb-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ssb-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.ssb-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.4);
    animation: ssbPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes ssbPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

.ssb-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.ssb-subtitle {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Buttons Container */
.ssb-buttons-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* Base Share Button */
.ssb-share-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: none;
    outline: none;
    cursor: pointer;
    user-select: none;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.ssb-share-btn .ssb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ssb-share-btn .ssb-icon svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), fill 0.25s ease !important;
}

.ssb-share-btn:active {
    transform: scale(0.94) !important;
}

/* Floating Tooltip */
.ssb-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.ssb-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.94) transparent transparent transparent;
}

.ssb-share-btn:hover .ssb-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* ===================================================
   GLASSMORPHISM CIRCLES (PRIMARY STYLE)
   =================================================== */
.ssb-style-circles .ssb-share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.ssb-style-circles .ssb-btn-text {
    display: none;
}

.ssb-style-circles .ssb-share-btn:hover {
    transform: translateY(-4px) scale(1.08) !important;
}

.ssb-style-circles .ssb-share-btn:hover .ssb-icon svg {
    transform: scale(1.12);
    fill: #ffffff !important;
}

/* Explicit Brand Colors for SVGs in Light Mode */
.ssb-style-circles .ssb-btn-whatsapp svg { fill: var(--ssb-whatsapp) !important; }
.ssb-style-circles .ssb-btn-whatsapp { background: rgba(37, 211, 102, 0.1); border-color: rgba(37, 211, 102, 0.3); }
.ssb-style-circles .ssb-btn-whatsapp:hover {
    background: var(--ssb-whatsapp) !important;
    border-color: var(--ssb-whatsapp) !important;
    box-shadow: 0 10px 24px -2px rgba(37, 211, 102, 0.5), 0 0 12px rgba(37, 211, 102, 0.3) !important;
}

.ssb-style-circles .ssb-btn-telegram svg { fill: var(--ssb-telegram) !important; }
.ssb-style-circles .ssb-btn-telegram { background: rgba(34, 158, 217, 0.1); border-color: rgba(34, 158, 217, 0.3); }
.ssb-style-circles .ssb-btn-telegram:hover {
    background: var(--ssb-telegram) !important;
    border-color: var(--ssb-telegram) !important;
    box-shadow: 0 10px 24px -2px rgba(34, 158, 217, 0.5), 0 0 12px rgba(34, 158, 217, 0.3) !important;
}

.ssb-style-circles .ssb-btn-facebook svg { fill: var(--ssb-facebook) !important; }
.ssb-style-circles .ssb-btn-facebook { background: rgba(24, 119, 242, 0.1); border-color: rgba(24, 119, 242, 0.3); }
.ssb-style-circles .ssb-btn-facebook:hover {
    background: var(--ssb-facebook) !important;
    border-color: var(--ssb-facebook) !important;
    box-shadow: 0 10px 24px -2px rgba(24, 119, 242, 0.5), 0 0 12px rgba(24, 119, 242, 0.3) !important;
}

.ssb-style-circles .ssb-btn-linkedin svg { fill: var(--ssb-linkedin) !important; }
.ssb-style-circles .ssb-btn-linkedin { background: rgba(10, 102, 194, 0.1); border-color: rgba(10, 102, 194, 0.3); }
.ssb-style-circles .ssb-btn-linkedin:hover {
    background: var(--ssb-linkedin) !important;
    border-color: var(--ssb-linkedin) !important;
    box-shadow: 0 10px 24px -2px rgba(10, 102, 194, 0.5), 0 0 12px rgba(10, 102, 194, 0.3) !important;
}

.ssb-style-circles .ssb-btn-instagram svg { fill: var(--ssb-instagram-solid) !important; }
.ssb-style-circles .ssb-btn-instagram { background: rgba(225, 48, 108, 0.1); border-color: rgba(225, 48, 108, 0.3); }
.ssb-style-circles .ssb-btn-instagram:hover {
    background: var(--ssb-instagram) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 24px -2px rgba(225, 48, 108, 0.5), 0 0 12px rgba(225, 48, 108, 0.3) !important;
}

.ssb-style-circles .ssb-btn-copy svg { fill: #475569 !important; }
.ssb-style-circles .ssb-btn-copy { background: rgba(100, 116, 139, 0.1); border-color: rgba(100, 116, 139, 0.25); }
.ssb-style-circles .ssb-btn-copy:hover {
    background: #0f172a !important;
    border-color: #0f172a !important;
    box-shadow: 0 10px 24px -2px rgba(15, 23, 42, 0.4) !important;
}


/* ===================================================
   DARK THEME COMPATIBILITY (MoreNews .aft-dark-mode, dark-mode, etc.)
   =================================================== */
body.aft-dark-mode .ssb-widget-inner,
body.dark-mode .ssb-widget-inner,
body.dark .ssb-widget-inner,
[data-theme="dark"] .ssb-widget-inner {
    background: rgba(28, 28, 33, 0.88) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.aft-dark-mode .ssb-title,
body.dark-mode .ssb-title,
body.dark .ssb-title,
[data-theme="dark"] .ssb-title {
    color: #f8fafc !important;
}

body.aft-dark-mode .ssb-subtitle,
body.dark-mode .ssb-subtitle,
body.dark .ssb-subtitle,
[data-theme="dark"] .ssb-subtitle {
    color: #94a3b8 !important;
}

/* Circles in Dark Mode */
body.aft-dark-mode .ssb-style-circles .ssb-share-btn,
body.dark-mode .ssb-style-circles .ssb-share-btn,
body.dark .ssb-style-circles .ssb-share-btn,
[data-theme="dark"] .ssb-style-circles .ssb-share-btn {
    background: rgba(255, 255, 255, 0.07) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

/* Vivid Icons in Dark Mode */
body.aft-dark-mode .ssb-style-circles .ssb-btn-whatsapp svg,
body.dark-mode .ssb-style-circles .ssb-btn-whatsapp svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-whatsapp svg {
    fill: #25D366 !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-whatsapp,
body.dark-mode .ssb-style-circles .ssb-btn-whatsapp,
[data-theme="dark"] .ssb-style-circles .ssb-btn-whatsapp {
    border-color: rgba(37, 211, 102, 0.35) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-telegram svg,
body.dark-mode .ssb-style-circles .ssb-btn-telegram svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-telegram svg {
    fill: #38bdf8 !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-telegram,
body.dark-mode .ssb-style-circles .ssb-btn-telegram,
[data-theme="dark"] .ssb-style-circles .ssb-btn-telegram {
    border-color: rgba(56, 189, 248, 0.35) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-facebook svg,
body.dark-mode .ssb-style-circles .ssb-btn-facebook svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-facebook svg {
    fill: #3b82f6 !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-facebook,
body.dark-mode .ssb-style-circles .ssb-btn-facebook,
[data-theme="dark"] .ssb-style-circles .ssb-btn-facebook {
    border-color: rgba(59, 130, 246, 0.35) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-linkedin svg,
body.dark-mode .ssb-style-circles .ssb-btn-linkedin svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-linkedin svg {
    fill: #0ea5e9 !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-linkedin,
body.dark-mode .ssb-style-circles .ssb-btn-linkedin,
[data-theme="dark"] .ssb-style-circles .ssb-btn-linkedin {
    border-color: rgba(14, 165, 233, 0.35) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-instagram svg,
body.dark-mode .ssb-style-circles .ssb-btn-instagram svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-instagram svg {
    fill: #f43f5e !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-instagram,
body.dark-mode .ssb-style-circles .ssb-btn-instagram,
[data-theme="dark"] .ssb-style-circles .ssb-btn-instagram {
    border-color: rgba(244, 63, 94, 0.35) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-copy svg,
body.dark-mode .ssb-style-circles .ssb-btn-copy svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-copy svg {
    fill: #cbd5e1 !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-copy,
body.dark-mode .ssb-style-circles .ssb-btn-copy,
[data-theme="dark"] .ssb-style-circles .ssb-btn-copy {
    border-color: rgba(203, 213, 225, 0.25) !important;
}

/* Hover States in Dark Mode: Fill and Glow */
body.aft-dark-mode .ssb-style-circles .ssb-share-btn:hover svg,
body.dark-mode .ssb-style-circles .ssb-share-btn:hover svg,
[data-theme="dark"] .ssb-style-circles .ssb-share-btn:hover svg {
    fill: #ffffff !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-whatsapp:hover,
body.dark-mode .ssb-style-circles .ssb-btn-whatsapp:hover,
[data-theme="dark"] .ssb-style-circles .ssb-btn-whatsapp:hover {
    background: var(--ssb-whatsapp) !important;
    border-color: var(--ssb-whatsapp) !important;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-telegram:hover,
body.dark-mode .ssb-style-circles .ssb-btn-telegram:hover,
[data-theme="dark"] .ssb-style-circles .ssb-btn-telegram:hover {
    background: var(--ssb-telegram) !important;
    border-color: var(--ssb-telegram) !important;
    box-shadow: 0 10px 28px rgba(34, 158, 217, 0.6) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-facebook:hover,
body.dark-mode .ssb-style-circles .ssb-btn-facebook:hover,
[data-theme="dark"] .ssb-style-circles .ssb-btn-facebook:hover {
    background: var(--ssb-facebook) !important;
    border-color: var(--ssb-facebook) !important;
    box-shadow: 0 10px 28px rgba(24, 119, 242, 0.6) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-linkedin:hover,
body.dark-mode .ssb-style-circles .ssb-btn-linkedin:hover,
[data-theme="dark"] .ssb-style-circles .ssb-btn-linkedin:hover {
    background: var(--ssb-linkedin) !important;
    border-color: var(--ssb-linkedin) !important;
    box-shadow: 0 10px 28px rgba(10, 102, 194, 0.6) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-instagram:hover,
body.dark-mode .ssb-style-circles .ssb-btn-instagram:hover,
[data-theme="dark"] .ssb-style-circles .ssb-btn-instagram:hover {
    background: var(--ssb-instagram) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 28px rgba(225, 48, 108, 0.6) !important;
}

body.aft-dark-mode .ssb-style-circles .ssb-btn-copy:hover,
body.dark-mode .ssb-style-circles .ssb-btn-copy:hover,
[data-theme="dark"] .ssb-style-circles .ssb-btn-copy:hover {
    background: #ffffff !important;
    border-color: #ffffff !important;
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.3) !important;
}
body.aft-dark-mode .ssb-style-circles .ssb-btn-copy:hover svg,
body.dark-mode .ssb-style-circles .ssb-btn-copy:hover svg,
[data-theme="dark"] .ssb-style-circles .ssb-btn-copy:hover svg {
    fill: #0f172a !important;
}


/* ===================================================
   FALLBACK STYLES (PILLS & MINIMAL)
   =================================================== */
.ssb-style-pills .ssb-share-btn {
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff !important;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
}
.ssb-style-pills .ssb-share-btn svg { fill: #ffffff !important; }
.ssb-style-pills .ssb-tooltip { display: none; }
.ssb-style-pills .ssb-btn-whatsapp { background: var(--ssb-whatsapp); box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35); }
.ssb-style-pills .ssb-btn-telegram { background: var(--ssb-telegram); box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35); }
.ssb-style-pills .ssb-btn-facebook { background: var(--ssb-facebook); box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35); }
.ssb-style-pills .ssb-btn-linkedin { background: var(--ssb-linkedin); box-shadow: 0 4px 14px rgba(10, 102, 194, 0.35); }
.ssb-style-pills .ssb-btn-instagram { background: var(--ssb-instagram); box-shadow: 0 4px 14px rgba(225, 48, 108, 0.35); }
.ssb-style-pills .ssb-btn-copy {
    background: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}
.ssb-style-pills .ssb-btn-copy svg { fill: #334155 !important; }

.ssb-style-minimal .ssb-share-btn {
    padding: 8px 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569 !important;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}
.ssb-style-minimal .ssb-tooltip { display: none; }


/* ===================================================
   TOAST NOTIFICATION (COPY LINK & INSTAGRAM)
   =================================================== */
.ssb-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #ffffff !important;
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999999;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ssb-toast.ssb-toast-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ssb-toast-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ssb-toast-check svg {
    width: 12px;
    height: 12px;
    fill: #ffffff !important;
}

/* Responsiveness */
@media (max-width: 640px) {
    .ssb-widget-inner {
        padding: 20px 18px;
        border-radius: 16px;
    }

    .ssb-buttons-container {
        gap: 10px;
        justify-content: flex-start;
    }

    .ssb-style-circles .ssb-share-btn {
        width: 44px;
        height: 44px;
    }

    .ssb-toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
        justify-content: center;
    }
}
