/* AI Chatbot Styles */

.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
}

/* Trigger Button */
.chatbot-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-gradient-1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px var(--shadow-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.chatbot-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px var(--shadow-glow);
}

.chatbot-trigger svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Window */
.chatbot-window {
    width: 380px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
    transform-origin: bottom right;
}

.chatbot-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

/* Header */
.chatbot-header {
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--card-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: var(--font-color-2nd);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
}

.chatbot-close:hover {
    color: #fff;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease forwards;
}

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

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: var(--font-color);
    border-bottom-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background: var(--bg-gradient-1);
    color: white;
    border-bottom-right-radius: 2px;
}

/* Input Area */
.chatbot-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--card-border-color);
    display: flex;
    gap: 0.8rem;
}

.chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: white;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: var(--color-bright);
}

.chatbot-send {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bright);
    transition: transform 0.2s;
}

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

.chatbot-send svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--font-color-2nd);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
