/* ==========================================================================
   Floating Messengers & Live Chat Component CSS
   ========================================================================== */

#omnichannelBackdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 65;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#omnichannelBackdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

#omnichannelFloatingWidget {
    position: fixed;
    z-index: 68;
    direction: ltr;
}

@media (max-width: 1023px) {
    #omnichannelFloatingWidget {
        position: static;
    }
    
    #omnichannelMenu {
        position: fixed;
        bottom: 5rem;
        left: 1rem;
        right: 1rem;
        max-width: 320px;
        margin: 0 auto;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.875rem;
        border-radius: 1.5rem;
        border: 1px solid rgba(226, 232, 240, 0.8);
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
        z-index: 70;
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        animation: fadeInMenuMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .omnichannel-item {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

@media (min-width: 1024px) {
    #omnichannelFloatingWidget {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    #omnichannelMenu {
        position: absolute;
        bottom: 3.75rem;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        z-index: 70;
        animation: fadeInMenu 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

#omnichannelMenu.is-open {
    display: flex !important;
}

#omnichannelMenu.hidden {
    display: none !important;
}

/* Standardized Uniform Button styling for Omnichannel Items */
.omnichannel-item {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.875rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    direction: rtl;
    text-decoration: none;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
}

.omnichannel-item:hover {
    transform: scale(1.02) translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.omnichannel-badge {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.625rem;
    background-color: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 900;
    flex-shrink: 0;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInMenuMobile {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Speed Dial Button Elements */
.speed-dial-btn {
    width: 220px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-radius: 1rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s var(--theme-spring, cubic-bezier(0.34, 1.56, 0.64, 1)), box-shadow 0.2s ease;
    direction: rtl;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.speed-dial-btn:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.2);
}

/* Responsive Live Chat & AI Container */
#liveChatWidgetContainer,
#aiChatWidget {
    position: fixed;
    z-index: 55;
    direction: rtl;
    text-align: right;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    /* Mobile responsive boundaries */
    bottom: 4.75rem;
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    max-height: 80vh;
    animation: chatSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
    #liveChatWidgetContainer,
    #aiChatWidget {
        left: 1.5rem;
        right: auto;
        width: 380px;
        bottom: 5.25rem;
    }
}

@media (min-width: 1024px) {
    #liveChatWidgetContainer,
    #aiChatWidget {
        bottom: 5.5rem;
        left: 1.5rem;
    }
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
