/* JIES Social Widget Styles */
:root {
    --color-primary: #D9232D;
    --color-secondary: #009B4D;
    --color-dark: #1F2937;
    --color-white: #FFFFFF;

    /* Brand Colors for Icons */
    --brand-whatsapp: #25D366;
    --brand-facebook: #1877F2;
    --brand-instagram: #E4405F;
    --brand-linkedin: #0A66C2;

    --shadow-premium: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition-smooth: 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jies-social-widget {
    position: fixed;
    right: 30px;
    bottom: 100px;
    /* Above the scroll to top button */
    z-index: 9998;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 15px;
}

/* Toggle Button */
.jies-social-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #B91C25 100%);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    transition: all var(--transition-smooth);
    z-index: 2;
}

/* Hover Pulse Effect */
.jies-social-toggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    animation: pulse-ring 2s infinite;
    opacity: 0.6;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.jies-social-toggle:hover {
    transform: scale(1.05);
}

/* Icon Switching */
.jies-social-toggle .fa-times {
    display: none;
    font-size: 1.6rem;
}

.jies-social-widget.active .jies-social-toggle {
    background: var(--color-dark);
    transform: rotate(90deg);
}

.jies-social-widget.active .jies-social-toggle .fa-comment-dots {
    display: none;
}

.jies-social-widget.active .jies-social-toggle .fa-times {
    display: block;
}

/* Menu Container */
.jies-social-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all var(--transition-smooth);
    pointer-events: none;
}

.jies-social-widget.active .jies-social-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Social Items */
.jies-social-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    gap: 12px;
    transform: translateX(10px);
    opacity: 0;
    transition: all var(--transition-smooth);
}

.jies-social-widget.active .jies-social-item {
    transform: translateX(0);
    opacity: 1;
}

/* Staggered Animation Delay for Items */
.jies-social-widget.active .jies-social-item:nth-child(1) {
    transition-delay: 50ms;
}

.jies-social-widget.active .jies-social-item:nth-child(2) {
    transition-delay: 100ms;
}

.jies-social-widget.active .jies-social-item:nth-child(3) {
    transition-delay: 150ms;
}

.jies-social-widget.active .jies-social-item:nth-child(4) {
    transition-delay: 200ms;
}

.jies-social-widget.active .jies-social-item:nth-child(5) {
    transition-delay: 250ms;
}

/* Icon Box Styles */
.jies-social-item .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--color-dark);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

/* Labels */
.jies-social-item .label {
    background: var(--color-white);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.jies-social-item:hover .label {
    opacity: 1;
    transform: translateX(0);
}

/* Hover Colors */
.jies-social-item:hover .icon-box {
    color: var(--color-white);
    transform: scale(1.1);
}

.jies-social-item.phone:hover .icon-box {
    background: var(--color-secondary);
}

.jies-social-item.whatsapp:hover .icon-box {
    background: var(--brand-whatsapp);
}

.jies-social-item.facebook:hover .icon-box {
    background: var(--brand-facebook);
}

.jies-social-item.instagram:hover .icon-box {
    background: var(--brand-instagram);
}

.jies-social-item.linkedin:hover .icon-box {
    background: var(--brand-linkedin);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jies-social-widget {
        bottom: 80px;
        right: 20px;
    }

    .jies-social-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .jies-social-item .icon-box {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .jies-social-item .label {
        display: none;
        /* Hide labels on mobile to keep it clean, or keep them if needed */
    }
}