/* VAST-Ghana AI Assistant Styles */

:root {
    --chat-primary: #1B4965;
    --chat-secondary: #62B6CB;
    --chat-bg: rgba(255, 255, 255, 0.85);
    --chat-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Floating Toggle Button */
#vast-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(27, 73, 101, 0.4);
    z-index: 99999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#vast-chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(27, 73, 101, 0.5);
}

#vast-chat-toggle i {
    font-size: 24px;
}

/* Chat Window */
#vast-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    max-height: calc(100vh - 150px);
    background: var(--chat-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99998;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Chat Header */
.chat-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.chat-header h3 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.chat-header p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

#chat-close {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#chat-close:hover {
    opacity: 1;
}

/* Chat Messages */
#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: messageIn 0.3s ease-out;
}

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

.message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.message-time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 4px;
    display: block;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-self: flex-start;
    background: white;
    padding: 12px 16px;
    border-radius: 15px;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dots-loader {
    display: flex;
    gap: 4px;
}

.dots-loader span {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dots-loader span:nth-child(1) { animation-delay: -0.32s; }
.dots-loader span:nth-child(2) { animation-delay: -0.16s; }

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

/* Chat Input */
.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

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

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

#chat-send:hover {
    transform: scale(1.05);
}

#chat-send:active {
    transform: scale(0.95);
}

/* Quick Replies */
.quick-replies {
    padding: 0 15px 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: white;
}

.quick-reply-btn {
    padding: 6px 12px;
    background: #f0f4f8;
    border: 1px solid #e1e8ed;
    border-radius: 15px;
    font-size: 12px;
    color: var(--chat-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply-btn:hover {
    background: var(--chat-primary);
    color: white;
    border-color: var(--chat-primary);
}
