﻿/* chatbot-en.css - Smart Assistant Styles - Blue Theme - Left Side */

/* ⭐⭐ Main Container - LEFT SIDE ⭐⭐ */
.floating-chatbot-container {
    position: fixed;
    bottom: 30px;
    left: 30px;  /* Changed from right to left */
    z-index: 9999;
    direction: ltr;  /* Left-to-right for English */
    transition: all 0.3s ease !important;
}

/* ⭐⭐ Assistant Label ⭐⭐ */
.assistant-label {
    position: absolute;
    bottom: 90px;
    left: 0;  /* Changed from right to left */
    background: #1976D2;  /* Blue color like Arabic version */
    color: white;
    padding: 10px 25px;
    border-radius: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.3);
    white-space: nowrap;
    user-select: none;
    transition: all 0.3s ease;
}

.assistant-label:hover {
    background: #1565C0;  /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(25, 118, 210, 0.4);
}

.assistant-label i {
    margin-right: 8px;
}

/* ⭐⭐ Chatbot Icon ⭐⭐ */
.chatbot-icon {
    position: relative;
    width: 70px;
    height: 70px;
    background: #1976D2;  /* Blue color */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.3);
    transition: all 0.3s ease;
    z-index: 10000;
    user-select: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(25, 118, 210, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 118, 210, 0);
    }
}

.chatbot-icon i {
    color: white;
    font-size: 2.2rem;
    transition: all 0.3s ease;
}

.chatbot-icon:hover {
    transform: scale(1.1) rotate(-5deg);  /* Negative rotation for English */
    background: #1565C0;
    box-shadow: 0 6px 25px rgba(25, 118, 210, 0.4);
}

/* ⭐⭐ Chat Window - LEFT SIDE ⭐⭐ */
.chatbot-window {
    position: absolute;
    bottom: 100px;
    left: 0;  /* Changed from right to left */
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    direction: ltr;
    z-index: 10001;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ⭐⭐ Chat Header ⭐⭐ */
.chatbot-header {
    background: #1976D2;  /* Blue color */
    color: white;
    padding: 15px 20px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar i {
    font-size: 1.8rem;
    color: white;
}

.header-info {
    flex: 1;
}

.header-info h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header-info p {
    margin: 5px 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.header-actions .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.header-actions .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ⭐⭐ Messages Area ⭐⭐ */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ⭐⭐ Messages ⭐⭐ */
.message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.user-avatar {
    background: #1976D2;  /* Blue for user */
    color: white;
}

.bot-avatar {
    background: #e9ecef;
    color: #1976D2;  /* Blue for bot icon */
}

.message-bubble {
    max-width: 75%;
    padding: 12px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.user-bubble {
    background: #1976D2;  /* Blue for user messages */
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-bubble {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.message-text {
    font-size: 1rem;
    line-height: 1.5;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.7;
    text-align: right;
}

.user-bubble .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* ⭐⭐ Input Area - Larger text while typing ⭐⭐ */
.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    resize: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.3rem !important;  /* Larger text while typing */
    font-weight: bold !important;    /* Bold text while typing */
    outline: none;
    transition: all 0.3s ease;
    max-height: 100px;
    min-height: 45px;
}

.chat-input:focus {
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.chat-input::placeholder {
    color: #aaa;
    font-size: 1rem;
    font-weight: normal;
}

/* ⭐⭐ Send Button ⭐⭐ */
.send-btn {
    width: 45px;
    height: 45px;
    background: #1976D2;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #1565C0;
    transform: scale(1.1);
}

.send-btn i {
    font-size: 1.2rem;
}

/* ⭐⭐ Typing Indicator ⭐⭐ */
.typing-indicator .typing-dots {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #1976D2;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.6;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ⭐⭐ Hidden Label State ⭐⭐ */
.assistant-label-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
}

/* ⭐⭐ Mobile Responsive ⭐⭐ */
@media (max-width: 480px) {
    .floating-chatbot-container {
        bottom: 20px;
        left: 20px;  /* Keep left on mobile */
    }
    
    .assistant-label {
        font-size: 0.9rem;
        padding: 8px 16px;
        bottom: 80px;
        left: 0;
    }
    
    .chatbot-icon {
        width: 60px;
        height: 60px;
    }
    
    .chatbot-icon i {
        font-size: 1.8rem;
    }
    
    .chatbot-window {
        width: 340px;
        height: 450px;
        bottom: 90px;
        left: 0;
    }
    
    .chat-input {
        font-size: 1.2rem !important;
    }
}