/* ChatBot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
}

[dir="rtl"] .chatbot-widget {
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 100px;
        right: 15px;
    }
    
    [dir="rtl"] .chatbot-widget {
        right: auto;
        left: 15px;
    }
}

/* ChatBot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5);
}

.chatbot-toggle i {
    font-size: 24px;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid white;
}

[dir="rtl"] .chatbot-badge {
    right: auto;
    left: -5px;
}

/* ChatBot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 200px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .chatbot-window {
    right: auto;
    left: 0;
}

.chatbot-window.hidden {
    display: none;
}

.chatbot-window.minimized {
    height: 60px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 150px);
        max-height: calc(100vh - 150px);
        bottom: 100px;
        right: 15px;
        border-radius: 15px;
    }
    
    [dir="rtl"] .chatbot-window {
        right: auto;
        left: 15px;
    }
}

/* ChatBot Header */
.chatbot-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-header-info i {
    font-size: 24px;
}

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

.chatbot-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

.chatbot-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chatbot-btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.chatbot-btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ChatBot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
}

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

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

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

.chatbot-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

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

.chatbot-message.user .chatbot-message-content {
    background: #2563eb;
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.chatbot-message.bot .chatbot-message-content {
    background: #f1f5f9;
    color: #1e293b;
    border-radius: 18px 18px 18px 4px;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chatbot-message.user .chatbot-avatar {
    display: none;
}

.chatbot-message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    word-wrap: break-word;
}

.chatbot-message-content p {
    margin: 0;
    line-height: 1.5;
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    animation: typing 1.4s infinite;
}

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

.typing-dots 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;
    }
}

/* ChatBot Suggestions */
.chatbot-suggestions {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.chatbot-suggestions-title {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.chatbot-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chatbot-suggestion-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    color: #475569;
}

[dir="rtl"] .chatbot-suggestion-btn {
    text-align: right;
}

.chatbot-suggestion-btn:hover {
    background: #f1f5f9;
    border-color: #2563eb;
    color: #2563eb;
}

/* ChatBot Input */
.chatbot-input-container {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
    background: white;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

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

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Font Recommendations */
.chatbot-font-recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.chatbot-font-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.chatbot-font-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.chatbot-font-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.chatbot-font-price {
    margin: 0;
    font-size: 0.875rem;
    color: #2563eb;
    font-weight: 600;
}

.chatbot-font-link {
    background: #f1f5f9;
    color: #2563eb;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-font-link:hover {
    background: #2563eb;
    color: white;
}

