/* BRAT CHATBOT FLOATING WIDGET LAYOUT STYLING */

/* FLOATING TRIGGER BUTTON */
.brat-chatbot-trigger-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--bubble-user-text);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), var(--primary-glow);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}

.brat-chatbot-trigger-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.20), 0 0 15px var(--primary-color);
}

.brat-chatbot-trigger-btn:active {
    transform: scale(0.95);
}

/* WIDGET APP WINDOW CONTAINER */
.brat-chatbot-widget-mode .brat-chatbot-app-container {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background-color: var(--bg-chat);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow-lg);
    z-index: 999999;
    display: flex;
    flex-direction: row;
    animation: bratChatbotSlideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    transition: background-color var(--transition-speed);
}

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

/* SIDEBAR LAYOUT (DRAWER MODE IN WIDGET) */
.brat-chatbot-widget-mode .brat-chatbot-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
}

.brat-chatbot-widget-mode .brat-chatbot-sidebar.open {
    transform: translateX(0);
}

.brat-chatbot-widget-mode .brat-chatbot-sidebar-overlay {
    z-index: 95;
}

.brat-chatbot-widget-mode .brat-chatbot-sidebar.open + .brat-chatbot-sidebar-overlay {
    display: block;
}

/* WIDGET MOBILE VIEW */
@media (max-width: 480px) {
    .brat-chatbot-widget-mode .brat-chatbot-app-container {
        position: fixed;
        bottom: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
    }
}
