/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.chat-toggle.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.chat-toggle .icon {
    transition: transform 0.3s ease;
}

.chat-toggle.active .icon {
    transform: rotate(45deg);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    pointer-events: none;
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-info h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.chat-body {
    height: 360px;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message-avatar.bot {
    background: #007bff;
    color: white;
}

.message-avatar.user {
    background: #6c757d;
    color: white;
}

.message-content {
    max-width: 80%;
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.bot .message-content {
    background: white;
    color: #333;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-content {
    background: #007bff;
    color: white;
    border-top-right-radius: 4px;
}

.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chat-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 100px;
    min-height: 40px;
}

.chat-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover:not(:disabled) {
    background: #0056b3;
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

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

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

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

.language-selector {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.lang-btn {
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: white;
    color: #007bff;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-action {
    padding: 6px 12px;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.quick-action:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Mobile responsiveness */
/* @media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 70vh;
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    .chat-widget {
        bottom: 20px;
        right: 20px;
    }
} */

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* .chat-widget {
        bottom: 20px;
        right: 20px;
        left: 20px;
    } */
    
    /* .chat-window {
        width: 100%;
        height: 60vh;
        bottom: 80px;
        right: 0;
        left: 0;
        border-radius: 20px 20px 0 0;
    } */
    
    /* .chat-toggle {
        position: absolute;
        right: 0;
        bottom: 0;
    } */
    
    /* .message-content {
        max-width: 85%;
    } */
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chat-window {
        background: #2d3748;
    }
    
    .chat-body {
        background: #1a202c;
    }
    
    .chat-message.bot .message-content {
        background: #4a5568;
        color: white;
    }
    
    .chat-input-container {
        background: #2d3748;
        border-top-color: #4a5568;
    }
    
    .chat-input {
        background: #4a5568;
        border-color: #4a5568;
        color: white;
    }
    
    .chat-input::placeholder {
        color: #a0aec0;
    }
}