/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: var(--font-main);
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.chat-toggle-btn svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
}

.chatbot-container.open .chat-toggle-btn .chat-icon {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.chatbot-container:not(.open) .close-icon {
    transform: rotate(-90deg) scale(0);
    opacity: 0;
}

.chatbot-container.open .close-icon {
    transform: rotate(0) scale(1);
    opacity: 1;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chatbot-container.open .chat-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    padding: 15px 20px;
    background-color: var(--user-msg-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.chat-header span {
    font-size: 0.8rem;
    color: var(--accent-color);
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.bot {
    background-color: var(--bot-msg-bg);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.bot a {
    color: var(--accent-color);
    text-decoration: underline;
}

.message.user {
    background-color: var(--user-msg-bg);
    color: var(--text-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    border: 1px solid var(--accent-glow);
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex-grow: 1;
    background-color: transparent;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}

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

.chat-input-area button {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-input-area button:hover {
    transform: scale(1.1);
}

.chat-input-area button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-left: 2px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: max(20px, var(--safe-area-bottom));
        right: 20px;
    }
    
    .chat-window {
        width: calc(100vw - 40px);
        height: 60vh;
        bottom: 70px;
    }
}
