/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    font-family: "Vazirmatn", "IRansansX", "IRANSans", "Tahoma", "Arial", sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f26a30 0%, #c40545 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(242, 106, 48, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(242, 106, 48, 0.5);
}

.chatbot-button .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #0f2f36;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #f26a30 0%, #c40545 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

.chatbot-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9f9f9;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #f26a30 0%, #c40545 100%);
    color: #fff;
}

.message.user .message-avatar {
    background: #e9ecef;
    color: #495057;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.bot .message-content {
    background: #fff;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-right-radius: 4px;
}

.message.user .message-content {
    background: linear-gradient(135deg, #f26a30 0%, #c40545 100%);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: left;
}

.message.user .message-time {
    text-align: right;
}

.chatbot-input-container {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chatbot-input-wrapper {
    flex: 1;
    position: relative;
}

.chatbot-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    outline: none;
    border-color: #f26a30;
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f26a30 0%, #c40545 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(242, 106, 48, 0.3);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    max-width: 75px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.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;
    }
}

.chatbot-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.chatbot-welcome-icon {
    font-size: 48px;
    color: #f26a30;
    margin-bottom: 12px;
}

.chatbot-welcome h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.chatbot-welcome p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 15px;
        left: 15px;
    }
    
    .chatbot-button {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        max-height: 600px;
        bottom: 76px;
        left: 0;
        border-radius: 16px;
    }
    
    .chatbot-header {
        padding: 14px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .chatbot-messages {
        padding: 16px;
    }
    
    .chatbot-input-container {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 10px;
        left: 10px;
    }
    
    .chatbot-button {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
    
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 72px;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 13px;
        padding: 10px 14px;
    }
}


