/* Chatbot Container */
.chatbot-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Chatbot Toggle - Now part of floating elements */
#chatbot-toggle {
    position: relative;
    border: none;
    cursor: pointer;
}

#chatbot-toggle .fas {
    font-size: 20px;
}

        /* Enhanced notification dot for floating chatbot */
        #chatbot-toggle .notification-dot {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 8px;
            height: 8px;
            background: linear-gradient(135deg, #10b981, #059669);
            border-radius: 50%;
            border: 2px solid white;
            animation: subtlePulse 3s infinite;
            opacity: 0;
            transform: scale(0);
            transition: all 0.3s ease;
        }

        #chatbot-toggle .notification-dot.show {
            opacity: 1;
            transform: scale(1);
        }

        /* Subtle pulse animation */
        @keyframes subtlePulse {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
                transform: scale(1.1);
            }
        }

        /* Enhanced chatbot toggle hover effect */
        #chatbot-toggle:hover .notification-dot {
            animation-duration: 1.5s;
        }

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background-color: #ff4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* Chatbot Window */
.chatbot-window {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    max-width: 90%;
    height: 500px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.chatbot-window.open {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    opacity: 1;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.fallback-icon {
    font-size: 24px;
    color: #4CAF50;
    display: none;
}

.avatar-image:not([src]),
.avatar-image[src=""] {
    display: none;
}

.avatar-image:not([src]) + .fallback-icon,
.avatar-image[src=""] + .fallback-icon {
    display: block;
}

.chatbot-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.chatbot-info .status {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 12px;
    display: flex;
}

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

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

.message-content {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.bot-message .message-content {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-message .message-content {
    background: #4CAF50;
    color: white;
}

.typing .message-content {
    background: #e9ecef;
    color: #666;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.timestamp {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* Quick Replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quick-reply {
    background: #e9ecef;
    border: none;
    border-radius: 16px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.quick-reply:hover {
    background: #d1d5db;
    transform: translateY(-2px);
}

.quick-reply:focus {
    outline: 2px solid #4CAF50;
}

/* Chatbot Input */
.chatbot-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid #e9ecef;
    background: #ffffff;
}

#chatbot-input-field {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

#chatbot-input-field:focus {
    border-color: #4CAF50;
}

#chatbot-send {
    background: none;
    border: none;
    color: #4CAF50;
    font-size: 18px;
    cursor: pointer;
    margin-left: 8px;
    transition: color 0.2s ease;
}

#chatbot-send:hover {
    color: #45a049;
}

#chatbot-send:focus {
    outline: 2px solid #4CAF50;
}

/* Enhanced Responsive Design */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 1rem);
        max-width: 300px;
        height: 350px;
        max-height: 60vh;
        bottom: 70px;
        right: 0.5rem;
        left: 0.5rem;
        margin: 0 auto;
        border-radius: 12px;
    }
    
    
    .chatbot-header {
        padding: 8px 10px;
    }
    
    .chatbot-avatar {
        width: 28px;
        height: 28px;
    }
    
    .chatbot-info h3 {
        font-size: 14px;
    }
    
    .chatbot-info .status {
        font-size: 10px;
    }
    
    .chatbot-messages {
        padding: 8px;
    }
    
    .message-content {
        font-size: 12px;
        padding: 6px 10px;
        max-width: 85%;
    }
    
    .quick-reply {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .chatbot-input {
        padding: 8px;
    }
    
    #chatbot-input-field {
        font-size: 12px;
        padding: 6px;
    }
}

/* Small mobile devices (320px and below) */
@media (max-width: 320px) {
    .chatbot-window {
        width: calc(100vw - 0.5rem);
        max-width: 280px;
        height: 320px;
        max-height: 55vh;
    }
    
}

/* Accessibility */
#chatbot-toggle:focus,
.chatbot-close:focus,
#chatbot-input-field:focus,
.quick-reply:focus,
#chatbot-send:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}