/* Chatbot Floating Widget Styles */

.chatbot-fab {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    z-index: 10000010;
    transition: all 0.3s ease;
}

.chatbot-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.6);
}

.chatbot-fab.active {
    transform: rotate(90deg);
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.chatbot-window {
    position: fixed;
    bottom: 170px;
    right: 30px;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 10000020 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-window.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: white;
    color: #0d6efd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.chatbot-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.2;
}

.chatbot-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    margin: 0;
}

/* Body / Chat Area */
.chatbot-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.chatbot-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chatbot-message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chatbot-message.user {
    align-self: flex-end;
    background: #0d6efd;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.2);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-self: flex-start;
    background: white;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #adb5bd;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Footer / Input Area */
.chatbot-footer {
    padding: 1rem;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #0d6efd;
}

.chatbot-send-btn {
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.chatbot-send-btn:hover {
    background: #0b5ed7;
}

.chatbot-send-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.chatbot-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px;
    margin-top: 0;
}

.chatbot-chip {
    background: #eef2f5;
    border: 1px solid #0d6efd;
    color: #0d6efd;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-chip:hover {
    background: #0d6efd;
    color: #fff;
}

@media (max-width: 576px) {
    .chatbot-window {
        width: 100%;
        height: calc(100vh - 130px);
        height: calc(100dvh - 130px);
        max-height: calc(100vh - 130px);
        max-height: calc(100dvh - 130px);
        bottom: 70px;
        right: 0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }
    
    .chatbot-window.show {
        transform: translateY(0);
    }
    
    .chatbot-fab {
        display: none !important;
    }
}
