/* الف چت‌بات - استایل‌های اصلی */

.alef-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* دکمه باز کردن چت */
.alef-chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    color: white;
}

.alef-chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* پنجره چت */
.alef-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.alef-chatbot-window-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* هدر چت */
.alef-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alef-chatbot-header-content h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.alef-chatbot-header-content p {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.alef-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.alef-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* بخش پیام‌ها */
.alef-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alef-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.alef-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.alef-chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.alef-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* پیام‌ها */
.alef-chatbot-message {
    display: flex;
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alef-chatbot-message-user {
    justify-content: flex-end;
}

.alef-chatbot-message-bot {
    justify-content: flex-start;
}

.alef-chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.alef-chatbot-message-user .alef-chatbot-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.alef-chatbot-message-bot .alef-chatbot-message-content {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* تایپینگ */
.alef-chatbot-typing {
    padding: 0 20px 12px;
    background: #f5f7fa;
}

.alef-chatbot-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.alef-chatbot-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.alef-chatbot-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.alef-chatbot-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* بخش ورودی */
.alef-chatbot-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.alef-chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.alef-chatbot-input:focus {
    border-color: #667eea;
}

.alef-chatbot-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.alef-chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.alef-chatbot-send:active {
    transform: scale(0.95);
}

/* ریسپانسیو */
@media (max-width: 480px) {
    .alef-chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .alef-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
        bottom: 80px;
        right: 10px;
        border-radius: 12px;
    }
    
    .alef-chatbot-toggle {
        width: 56px;
        height: 56px;
    }
}

/* حالت تاریک (اختیاری) */
@media (prefers-color-scheme: dark) {
    .alef-chatbot-window {
        background: #1a202c;
    }
    
    .alef-chatbot-messages {
        background: #2d3748;
    }
    
    .alef-chatbot-message-bot .alef-chatbot-message-content {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .alef-chatbot-input-container {
        background: #1a202c;
        border-top-color: #4a5568;
    }
    
    .alef-chatbot-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .alef-chatbot-typing {
        background: #2d3748;
    }
    
    .alef-chatbot-typing-indicator {
        background: #4a5568;
    }
}


