/* Chatbot Floating Button */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--gradient-violet);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    z-index: 900;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    height: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-window.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chat-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.chat-close {
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--text-muted);
}

/* Messages Area */
.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.bot {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: var(--accent-violet);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Input Area */
.chat-input-area {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-light);
}

.chat-input {
    flex-grow: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-family: inherit;
    outline: none;
}

.chat-input:focus {
    border-color: var(--accent-violet);
}

.chat-send {
    background: var(--accent-violet);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .chatbot-toggle {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Hourglass Rotation Animation */
.loading-hourglass {
    display: inline-block;
    animation: rotate-hourglass 2s linear infinite;
    font-size: 1.2rem;
    margin: 0 5px;
}

@keyframes rotate-hourglass {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}