/* ============================================================
   CHATBOT.CSS - Floating AI Chatbot for Ethio Areb Agency
   ============================================================ */

.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2D6FB7, #12A9C6);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(45, 111, 183, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: chatbotPulse 2s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(45, 111, 183, 0.5);
}

.chatbot-toggle .notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-dot 2s infinite;
}

@keyframes chatbotPulse {
    0%, 100% { box-shadow: 0 8px 30px rgba(45, 111, 183, 0.4); }
    50% { box-shadow: 0 8px 50px rgba(45, 111, 183, 0.6); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

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

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

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: chatbotSlideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #2D6FB7, #12A9C6);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-left .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: 18px;
}

.chatbot-header-left .info .title {
    font-weight: 600;
    font-size: 16px;
}

.chatbot-header-left .info .status {
    font-size: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chatbot-header-left .info .status .dot {
    width: 8px;
    height: 8px;
    background: #6CC04A;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s infinite;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    background: #F8FAFC;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 8px;
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
    animation: messageFadeIn 0.3s ease;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.assistant {
    justify-content: flex-start;
}

.chat-message .message-bubble {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #2D6FB7, #12A9C6);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-bubble {
    background: white;
    color: #1F2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chatbot-typing {
    display: none;
    padding: 8px 16px;
    margin-bottom: 12px;
}

.chatbot-typing .typing-indicator {
    display: flex;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    width: fit-content;
}

.chatbot-typing .typing-indicator span {
    width: 8px;
    height: 8px;
    background: #D1D5DB;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.chatbot-typing .typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing .typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 16px 4px;
    background: #F8FAFC;
    border-top: 1px solid #E5E7EB;
}

.quick-reply-btn {
    padding: 6px 14px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4B5563;
    font-weight: 500;
}

.quick-reply-btn:hover {
    background: #EFF6FF;
    border-color: #2D6FB7;
    color: #2D6FB7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 111, 183, 0.1);
}

.quick-reply-btn:active {
    transform: scale(0.95);
}

.chatbot-input-area {
    padding: 12px 16px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 10px;
    background: white;
    flex-shrink: 0;
}

.chatbot-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.chatbot-input-area input:focus {
    border-color: #12A9C6;
    box-shadow: 0 0 0 3px rgba(18, 169, 198, 0.1);
}

.chatbot-input-area input::placeholder {
    color: #9CA3AF;
}

.chatbot-input-area button {
    padding: 10px 16px;
    background: linear-gradient(135deg, #2D6FB7, #12A9C6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.chatbot-input-area button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 111, 183, 0.3);
}

.chatbot-input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        right: 10px;
        left: 10px;
        width: auto;
        height: 460px;
        bottom: 80px;
    }
    
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-toggle {
        width: 54px;
        height: 54px;
        font-size: 22px;
    }
    
    .chatbot-header {
        padding: 12px 16px;
    }
    
    .chatbot-header-left .avatar {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    
    .chatbot-header-left .info .title {
        font-size: 14px;
    }
    
    .chatbot-messages {
        padding: 12px 14px;
    }
    
    .chat-message .message-bubble {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .chatbot-input-area {
        padding: 10px 12px;
    }
    
    .chatbot-input-area input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .chatbot-input-area button {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .quick-reply-btn {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 768px) {
    .chatbot-window {
        width: 340px;
        height: 500px;
        right: 20px;
        bottom: 90px;
    }
    
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .chatbot-window {
        width: 360px;
        height: 520px;
    }
}