/* ============================================================
   Charsutra floating social shortcuts
   - Sits above the existing scroll-to-top control on desktop
   - Clears the fixed mobile bottom navigation on phones
   ============================================================ */
.cs-floating-social {
    position: fixed;
    right: 30px;
    bottom: 120px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.cs-floating-social__link {
    --social-bg: #0f172a;
    --social-ring: rgba(15, 23, 42, 0.26);
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 50px;
    color: #fff !important;
    background: var(--social-bg);
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.20);
    text-decoration: none !important;
    pointer-events: auto;
    isolation: isolate;
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
    animation: cs-social-float 3.2s ease-in-out infinite;
}

.cs-floating-social__link::before {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: -1;
    border-radius: inherit;
    border: 2px solid var(--social-ring);
    opacity: 0;
    transform: scale(.88);
    animation: cs-social-pulse 2.4s ease-out infinite;
}

.cs-floating-social__link i {
    font-size: 24px;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.cs-floating-social__link--whatsapp {
    --social-bg: #25D366;
    --social-ring: rgba(37, 211, 102, .42);
}

.cs-floating-social__link--messenger {
    --social-bg: #0084FF;
    --social-ring: rgba(0, 132, 255, .40);
    animation-delay: .18s;
}

.cs-floating-social__link--messenger::before {
    animation-delay: .38s;
}

.cs-floating-social__link--facebook {
    --social-bg: #1877F2;
    --social-ring: rgba(24, 119, 242, .40);
    animation-delay: .35s;
}

.cs-floating-social__link--facebook::before {
    animation-delay: .55s;
}

.cs-floating-social__link:hover,
.cs-floating-social__link:focus-visible {
    color: #fff !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
    filter: saturate(1.08);
    outline: none;
    animation-play-state: paused;
}

.cs-floating-social__link:focus-visible {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .95), 0 0 0 7px var(--social-ring), 0 12px 30px rgba(15, 23, 42, .25);
}

.cs-floating-social__label {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translate(8px, -50%);
    background: #0f172a;
    color: #fff;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.cs-floating-social__link:hover .cs-floating-social__label,
.cs-floating-social__link:focus-visible .cs-floating-social__label {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

@keyframes cs-social-pulse {
    0% {
        opacity: .72;
        transform: scale(.90);
    }
    70%, 100% {
        opacity: 0;
        transform: scale(1.30);
    }
}

@keyframes cs-social-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Tablet: keep the controls compact while preserving the desktop relationship. */
@media (max-width: 991.98px) {
    .cs-floating-social {
        right: 20px;
        bottom: 118px;
    }

    .scroll-top {
        right: 20px !important;
    }
}

/* Mobile: clear the fixed bottom nav and stack above the scroll-to-top button. */
@media (max-width: 767.98px) {
    .scroll-top {
        right: 16px !important;
        bottom: 72px !important;
        width: 46px !important;
        height: 46px !important;
    }

    .scroll-top:after {
        width: 46px !important;
        height: 46px !important;
        line-height: 46px !important;
        font-size: 18px !important;
    }

    .cs-floating-social {
        right: 16px;
        bottom: 132px;
        gap: 10px;
    }

    .cs-floating-social__link {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-width: 2px;
        box-shadow: 0 7px 20px rgba(15, 23, 42, .20);
    }

    .cs-floating-social__link i {
        font-size: 22px;
    }

    .cs-floating-social__label {
        display: none;
    }
}

@media (max-width: 380px) {
    .cs-floating-social {
        right: 12px;
    }

    .scroll-top {
        right: 12px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-floating-social__link,
    .cs-floating-social__link::before {
        animation: none !important;
    }

    .cs-floating-social__link,
    .cs-floating-social__label {
        transition: none !important;
    }
}
