/* =============================================
   LICET AI CHATBOT — STYLES
   Matches the Smart Campus Portal Dark Theme
   ============================================= */

:root {
    --chat-bg: rgba(26, 29, 39, 0.95);
    --chat-border: rgba(255, 255, 255, 0.1);
    --chat-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --chat-primary: #6366f1;
    --chat-text: #f1f5f9;
    --chat-text-muted: #94a3b8;
}

/* Floating Chat Button */
#chatbot-toggler {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--chat-primary), #4f46e5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chatbot-toggler:hover {
    transform: scale(1.1) rotate(5deg);
}

#chatbot-toggler.active {
    transform: rotate(90deg) scale(0.9);
}

/* Chat Window Container */
#chatbot-container {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--chat-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--chat-shadow);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#chatbot-container.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chat Header */
.chatbot-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--chat-border);
}

.chatbot-header-icon {
    width: 38px;
    height: 38px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: var(--chat-text);
}

.chatbot-header-info span {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-header-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

/* Chat Messages Area */
#chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

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

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease forwards;
}

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

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

/* Chat Input Area */
.chatbot-input-area {
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--chat-border);
    display: flex;
    gap: 10px;
}

#chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--chat-border);
    border-radius: 10px;
    padding: 10px 15px;
    color: var(--chat-text);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: var(--chat-primary);
}

#chatbot-send {
    background: var(--chat-primary);
    border: none;
    border-radius: 10px;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

#chatbot-send:hover {
    filter: brightness(1.1);
}

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

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    width: fit-content;
    margin-bottom: 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--chat-text-muted);
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

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

/* Responsive */
@media (max-width: 480px) {
    #chatbot-container {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
