/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-sans);
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: none;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
    border: none;
    outline: none;
}

.chatbot-toggle:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: var(--accent-hover);
}

.chatbot-toggle.active {
    transform: rotate(90deg);
}

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

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

.chat-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.chat-clear {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.6;
    cursor: none;
    transition: var(--transition);
    padding: 5px;
}

.chat-header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.chat-action-btn {
    background: transparent;
    border: none;
    color: white;
    opacity: 0.6;
    cursor: none;
    transition: var(--transition);
    padding: 4px;
    font-size: 0.9rem;
}

.chat-action-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#chatClear:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.chat-status {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
}

.chat-suggestions {
    display: flex;
    gap: 10px;
    padding: 0.5rem 1.25rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.chat-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestion-chip {
    padding: 6px 14px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: none;
    transition: var(--transition);
}

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

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

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

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

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: messageSlide 0.3s ease-out;
}

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

.message-ai {
    align-self: flex-start;
    background-color: var(--bg-alt);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 2px;
}

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

.message-time {
    font-size: 0.65rem;
    margin-top: 4px;
    opacity: 0.6;
    display: block;
}

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

.chat-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.chat-mic {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: none;
    transition: var(--transition);
    padding: 0 5px;
}

.chat-mic:hover, .chat-mic.recording {
    color: var(--accent);
}

.chat-mic.recording {
    animation: micPulse 1.5s infinite;
}

@keyframes micPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.chat-input:focus {
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.08);
}

.chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    transition: var(--transition);
}

.chat-send:hover {
    transform: scale(1.1);
    background-color: var(--accent-hover);
}

.typing-indicator {
    align-self: flex-start;
    background-color: var(--bg-alt);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: flex;
    gap: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.flicker {
    animation: textFlicker 2s infinite linear;
}

@keyframes textFlicker {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.chat-status {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 500px;
        bottom: 80px;
        right: -10px;
    }
}

