/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, #FFA500 0%, #FF8C00 100%));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 165, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 165, 0, 0.6);
}

.chatbot-toggle i {
    color: white;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.chatbot-toggle.active i {
    transform: rotate(180deg);
}

.chatbot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 165, 0, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 120px);
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    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: var(--gradient-primary, linear-gradient(135deg, #FFA500 0%, #FF8C00 100%));
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-header-text p {
    margin: 2px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-color, #f8f9fa);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color, #FFA500);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    flex-direction: row;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.message-avatar.bot {
    background: var(--gradient-primary, linear-gradient(135deg, #FFA500 0%, #FF8C00 100%));
    color: white;
}

.message-avatar.user {
    background: var(--text-color, #333);
    color: white;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.bot .message-content {
    background: white;
    color: var(--text-color, #333);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-content {
    background: var(--gradient-primary, linear-gradient(135deg, #FFA500 0%, #FF8C00 100%));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-reply-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--primary-color, #FFA500);
    color: var(--primary-color, #FFA500);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-reply-btn:hover {
    background: var(--primary-color, #FFA500);
    color: white;
}

.typing-indicator {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color, #FFA500);
    animation: typing 1.4s infinite;
}

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

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-input-area {
    padding: 15px 20px;
    background: var(--card-bg, white);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: var(--bg-color, #f8f9fa);
    color: var(--text-color, #333);
    transition: border-color 0.3s ease;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary-color, #FFA500);
    background: white;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary, linear-gradient(135deg, #FFA500 0%, #FF8C00 100%));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dark Mode Styles */
body.dark-mode .chatbot-window {
    background: #1a1a2e;
}

body.dark-mode .chatbot-messages {
    background: #16213e;
}

body.dark-mode .chat-message.bot .message-content {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .chatbot-input-area {
    background: #1a1a2e;
    border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .chatbot-input {
    background: #16213e;
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .chatbot-input:focus {
    background: #1a1a2e;
    border-color: var(--primary-color, #FFA500);
}

body.dark-mode .quick-reply-btn {
    background: #1a1a2e;
    border-color: var(--primary-color, #FFA500);
    color: var(--primary-color, #FFA500);
}

body.dark-mode .typing-indicator {
    background: #1a1a2e;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 80px;
        height: calc(100vh - 100px);
    }
    
    .chatbot-toggle {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-toggle i {
        font-size: 20px;
    }
}
