/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

/* Chatbot Toggle Button */
.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(90,52,99,0.18);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(90,52,99,0.22);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.active {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-header-content i {
    font-size: 28px;
    animation: floating 3s ease-in-out infinite;
}

.chatbot-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--bg-secondary);
}

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

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

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

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.chatbot-message {
    display: flex;
    gap: 12px;
    animation: slideAndFade 0.4s ease-out;
}

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

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

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

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

.user-message .message-avatar {
    background: var(--accent-color);
    color: white;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.bot-message .message-content {
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: 15px 15px 15px 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
    padding: 12px 16px;
    border-radius: 15px 15px 5px 15px;
    box-shadow: 0 2px 8px rgba(90,52,99,0.12);
}

.message-content p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.user-message .message-content p {
    color: white;
}

.bot-message .message-content p {
    color: var(--text-primary);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 12px;
    animation: slideAndFade 0.4s ease-out;
}

.typing-indicator .message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.typing-dots {
    background: var(--bg-color);
    padding: 12px 16px;
    border-radius: 15px 15px 15px 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 5px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.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.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chatbot Suggestions */
.chatbot-suggestions {
    padding: 15px 20px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-weight: 500;
}

.suggestion-btn i {
    font-size: 11px;
}

.suggestion-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.suggestion-btn:active {
    transform: translateY(0);
}

/* Chatbot Input */
.chatbot-input {
    padding: 15px 20px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.chatbot-input input::placeholder {
    color: var(--text-muted);
}

.chatbot-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.chatbot-input button:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 5px 15px rgba(90,52,99,0.18);
}

.chatbot-input button:active {
    transform: scale(0.95) rotate(15deg);
}

.chatbot-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 75px;
        right: 50%;
        transform: translateX(50%) translateY(20px) scale(0.95);
    }
    
    .chatbot-window.active {
        transform: translateX(50%) translateY(0) scale(1);
    }
    
    .message-content {
        max-width: 75%;
    }
}

@media (max-width: 480px) {
    .chatbot-suggestions {
        padding: 10px 15px;
    }
    
    .suggestion-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}