/*
 * Al-Fares Chatbot Widget - Version 4.0.0
 * Last Updated: 2025-10-28
 * Author: Manus AI
 * Description: Chatbot widget styles for Al-Fares Center
 */

/* ===================================
   Chatbot Widget Container
   =================================== */
.chatbot-widget-alfares {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: var(--bg-white, #ffffff);
    border-radius: var(--radius-xl, 1rem);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.chatbot-widget-alfares.active {
    display: flex;
}

/* ===================================
   Chatbot Header
   =================================== */
.chatbot-header-alfares {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-xl, 1rem) var(--radius-xl, 1rem) 0 0;
}

.chatbot-header-alfares h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.chatbot-close-alfares {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.chatbot-close-alfares:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===================================
   Messages Container
   =================================== */
.chatbot-messages-alfares {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom Scrollbar */
.chatbot-messages-alfares::-webkit-scrollbar {
    width: 8px;
}

.chatbot-messages-alfares::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 4px;
}

.chatbot-messages-alfares::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

.chatbot-messages-alfares::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ===================================
   Message Bubbles
   =================================== */
.chatbot-message-alfares {
    display: flex;
    margin-bottom: 0.75rem;
    animation: fadeInMessage 0.3s ease;
}

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

.chatbot-message-alfares.bot {
    justify-content: flex-start;
}

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

.chatbot-message-bubble-alfares {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 1rem;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.chatbot-message-alfares.bot .chatbot-message-bubble-alfares {
    background: white;
    color: #1f2937;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chatbot-message-alfares.user .chatbot-message-bubble-alfares {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

/* ===================================
   Typing Indicator
   =================================== */
.chatbot-typing-alfares {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.125rem;
    background: white;
    border-radius: 1rem;
    border-bottom-left-radius: 0.25rem;
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chatbot-typing-alfares.active {
    display: flex;
}

.chatbot-typing-dot-alfares {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite;
}

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

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

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ===================================
   Input Area
   =================================== */
.chatbot-input-alfares {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chatbot-input-field-alfares {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg, 0.75rem);
    font-size: 0.9375rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input-field-alfares:focus {
    border-color: #2563eb;
}

.chatbot-send-alfares {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg, 0.75rem);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    white-space: nowrap;
}

.chatbot-send-alfares:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.chatbot-send-alfares:active {
    transform: translateY(0);
}

.chatbot-send-alfares:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===================================
   Mobile Responsive
   =================================== */
@media (max-width: 768px) {
    .chatbot-widget-alfares {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .chatbot-header-alfares {
        border-radius: 0;
    }

    .chatbot-messages-alfares {
        padding: 1rem;
    }

    .chatbot-input-alfares {
        padding: 1rem;
    }
}

/* RTL Support */
[dir="rtl"] .chatbot-widget-alfares {
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    [dir="rtl"] .chatbot-widget-alfares {
        left: 0;
    }
}

