/* Easybot Chatbot Styles */

.easybot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Nunito', sans-serif;
}

/* Chat Widget Button */
.easybot-widget {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.easybot-widget:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
}

.easybot-widget i {
    color: white;
    font-size: 24px;
}

/* Notification badge */
.easybot-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Chat Window */
.easybot-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.easybot-chat-window.open {
    display: flex;
}

/* Chat Header */
.easybot-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.easybot-header-info {
    display: flex;
    align-items: center;
}

.easybot-header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.easybot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.easybot-avatar i {
    font-size: 20px;
}

.easybot-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.easybot-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.easybot-close, .easybot-clear {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.easybot-close:hover, .easybot-clear:hover {
    background: rgba(255, 255, 255, 0.1);
}

.easybot-clear {
    font-size: 14px;
}

.easybot-clear:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* Chat Messages */
.easybot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.easybot-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.easybot-message.user {
    justify-content: flex-end;
}

.easybot-message.bot {
    justify-content: flex-start;
}

.easybot-message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.easybot-message.user .easybot-message-content {
    background: #007bff;
    color: white;
    border-bottom-right-radius: 5px;
}

.easybot-message.bot .easybot-message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
}

.easybot-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 5px;
    text-align: right;
}

.easybot-message.user .easybot-message-time {
    text-align: right;
}

.easybot-message.bot .easybot-message-time {
    text-align: left;
}

/* Typing Indicator */
.easybot-typing {
    display: none;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    max-width: 80%;
    margin-bottom: 15px;
}

.easybot-typing-dots {
    display: flex;
    gap: 4px;
}

.easybot-typing-dot {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.easybot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.easybot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    30% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick Replies */
.easybot-quick-replies {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.easybot-quick-reply {
    background: white;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.easybot-quick-reply:hover {
    background: #007bff;
    color: white;
}

/* Chat Input */
.easybot-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.easybot-input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.easybot-input:focus {
    border-color: #007bff;
}

.easybot-send-btn {
    background: #007bff;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.easybot-send-btn:hover {
    background: #0056b3;
}

.easybot-send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Welcome Message */
.easybot-welcome, .easybot-continuation {
    text-align: center;
    padding: 20px;
    color: #666;
}

.easybot-welcome img, .easybot-continuation .easybot-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.easybot-continuation .easybot-avatar {
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px;
}

.easybot-welcome h5 {
    margin-bottom: 5px;
    color: #007bff;
}

.easybot-welcome p, .easybot-continuation p {
    font-size: 13px;
    margin: 0;
}

.easybot-continuation p {
    color: #28a745;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .easybot-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 90px;
        right: 20px;
        left: 20px;
    }
    
    .easybot-container {
        bottom: 20px;
        right: 20px;
    }
}

/* Scrollbar Styles */
.easybot-messages::-webkit-scrollbar {
    width: 6px;
}

.easybot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.easybot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.2);
    border-radius: 3px;
}

.easybot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, 0.4);
}

/* Fade in animation for the entire chatbot */
.easybot-container {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}