/* Chatbot Styles - Navbar Integration */
.chatbot-navbar {
    position: relative;
    transition: all 0.3s ease;
}

.chatbot-navbar:hover {
    transform: scale(1.05);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 2s infinite;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chatbot-window {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1050;
    border: 1px solid #e0e0e0;
    animation: slideUp 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #2A5298, #3B82F6);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.chatbot-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: black;
}

.chatbot-status {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.chatbot-controls {
    display: flex;
    gap: 8px;
}

.btn-chatbot-control {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-chatbot-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.message-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #2A5298, #3B82F6);
    color: white;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 250px;
}

.message-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.quick-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-quick-action {
    background: #2A5298;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-quick-action:hover {
    background: #1e3a70;
    transform: translateY(-1px);
}

.chatbot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.chatbot-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #2A5298;
}

.btn-chatbot-send {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #2A5298, #3B82F6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-chatbot-send:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.btn-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    font-size: 12px;
    color: #666;
}

.chatbot-typing span {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Response animation */
.message-content.animating {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chatbot-window {
        width: 320px;
        height: 450px;
        left: 15px;
        bottom: 20px;
    }
    
    .message-content {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 30px);
        height: 400px;
        left: 15px;
        bottom: 15px;
    }
    
    .message-content {
        max-width: 180px;
    }
}

/* Custom scrollbar for messages */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Dark Theme Styles */
[data-theme="dark"] .chatbot-window {
    background: #1a1a1a;
    border: 1px solid #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .chatbot-header {
    background: linear-gradient(135deg, #ffd700, #e6c50d);
    border-bottom: 1px solid #ffd700;
}

[data-theme="dark"] .chatbot-title {
    color: black
}
[data-theme="dark"] .btn-chatbot-control {
    background: #333;
    color: #ffffff;
}

[data-theme="dark"] .btn-chatbot-control:hover {
    background: #444;
    transform: scale(1.1);
}

[data-theme="dark"] .chatbot-messages {
    background: #1a1a1a;
}

[data-theme="dark"] .message.bot-message .message-content {
    background: #2a2a2a;
    color: #ffffff;
    border: 1px solid #333;
}

[data-theme="dark"] .message.user-message .message-content {
    background: #2a5298;
    color: #ffffff;
}



[data-theme="dark"] .chatbot-input-area {
    background: #2a2a2a;
    border-top: 1px solid #333;
}

[data-theme="dark"] .chatbot-input {
    background: #333;
    color: #ffffff;
    border: 1px solid #444;
}

[data-theme="dark"] .chatbot-input:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

[data-theme="dark"] .chatbot-input::placeholder {
    color: #888;
}

[data-theme="dark"] .btn-chatbot-send {
    background: #2a5298;
    color: #ffffff;
}

[data-theme="dark"] .btn-chatbot-send:hover:not(:disabled) {
    background: #1e3c72;
    transform: scale(1.05);
}

[data-theme="dark"] .btn-chatbot-send:disabled {
    background: #333;
    color: #666;
}

[data-theme="dark"] .chatbot-typing {
    background: #2a2a2a;
}

[data-theme="dark"] .chatbot-typing span {
    background: #666;
}

/* Dark theme scrollbar */
[data-theme="dark"] .chatbot-messages::-webkit-scrollbar-track {
    background: #2a2a2a;
}

[data-theme="dark"] .chatbot-messages::-webkit-scrollbar-thumb {
    background: #444;
}

[data-theme="dark"] .chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}
