/* Chatbot Styles */
:root {
    --chat-bg: #0B0B0F;
    --chat-card: rgba(20, 20, 20, 0.95);
    --chat-accent: #2563eb;
    --chat-text: #ffffff;
    --chat-text-dim: #a1a1aa;
    --chat-border: rgba(255, 255, 255, 0.1);
}

.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.hide-chatbot .chatbot-container {
    display: none !important;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chat-accent);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--chat-bg);
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}

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

.chatbot-header {
    padding: 16px;
    background: var(--chat-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-header .close-chat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.message-bot {
    align-self: flex-start;
    background: var(--chat-card);
    color: var(--chat-text);
    border: 1px solid var(--chat-border);
    border-bottom-left-radius: 4px;
}

.message-user {
    align-self: flex-end;
    background: var(--chat-accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-input-area {
    padding: 12px;
    border-top: 1px solid var(--chat-border);
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.chatbot-input-area input {
    flex: 1;
    background: var(--chat-card);
    border: 1px solid var(--chat-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
    outline: none;
}

.chatbot-input-area input:focus {
    border-color: var(--chat-accent);
}

.chatbot-send-btn {
    background: var(--chat-accent);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

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

.typing-indicator {
    align-self: flex-start;
    background: var(--chat-card);
    padding: 8px 12px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    display: none;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--chat-text-dim);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
}

.chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--chat-border);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--chat-text-dim);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chip:hover {
    background: var(--chat-accent);
    color: white;
    border-color: var(--chat-accent);
}

/* Scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 400px;
    }
}