/**
 * Listeo AI Floating Chat Widget Styles
 *
 * @package Listeo_AI_Search
 * @since 1.0.0
 */

/* === Floating Widget Container === */
.listeo-floating-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

/* === Floating Button (60x60px circle) === */
.listeo-floating-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #222;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
}

.listeo-floating-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* .listeo-floating-chat-button:active {
    transform: scale(0.95);
} */

.listeo-floating-chat-button i {
    color: white;
    font-size: 24px;
    transition: all 0.2s ease;
}
.listeo-floating-chat-button i.sl-icon-arrow-down { font-size: 18px; }
/* Custom icon image styling */
.listeo-floating-custom-icon {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.2s ease;
}

/* Icon toggle animations */
.listeo-floating-icon-open,
.listeo-floating-icon-close {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* === Welcome Bubble === */
.listeo-floating-welcome-bubble {
    right: 0;
    background: white;
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    /* max-width: 280px; */
    animation: bubbleFadeIn 0.3s ease;
    z-index: 1;
    text-align: center;
    width: auto;
    margin-bottom: 75px;
    position: relative;
}

.listeo-floating-welcome-bubble-content {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #555;
}

.listeo-floating-welcome-bubble-arrow {
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
}

/* Hide welcome bubble */
.listeo-floating-welcome-bubble.hidden {
    display: none;
}

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

/* === Chat Popup (dimensions set via inline styles) === */
.listeo-floating-chat-popup {
    position: absolute;
    bottom: 75px;
    right: 0;
    /* width and height set dynamically via inline styles */
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: popupSlideIn 0.3s ease;
}


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

/* Override chat wrapper height for popup */
.listeo-floating-chat-popup .listeo-ai-chat-wrapper {
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.listeo-floating-chat-popup .listeo-ai-chat-container {
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
}


.listeo-floating-chat-popup { max-height: 75vh; }

@media (max-width: 768px) {
    .listeo-floating-chat-widget {
        bottom: 0;
        right: 0;
        width: 100%;
    }

    .listeo-floating-chat-popup {
        width: calc(100% - 30px) ! Important;
        height: calc(100vh - 100px) ! Important;
        bottom: 80px ! Important;
        right: 15px ! Important;
    }

    .listeo-floating-chat-button {
        bottom: 20px;
        right: 20px;
        position: absolute;
        zoom: 0.8;
    }
    .listeo-floating-welcome-bubble {
         right: 15px;
        width: fit-content;
        float: right;
    }
}

/* === Terms of Use Notice === */
.listeo-ai-chat-terms-notice {
    padding: 16px;
    padding-top: 0;
    font-size: 13px;
    line-height: 19px;
    text-align: center;
    margin-top: -5px;
    color: #666;
}

.listeo-ai-chat-terms-notice a {
    color: var(--listeo-primary-color);
    text-decoration: none;
}

.listeo-ai-chat-terms-notice a:hover {
    text-decoration: underline;
}