/* Chatbot Widget Styles */
:root {
    --chat-width: 350px;
    --chat-primary: var(--color-primary, #0A2540);
    --chat-secondary: var(--color-secondary, #00B8D9);
    --chat-bg: #ffffff;
    --chat-text: #333333;
    --chat-user-msg-bg: #f0f2f5;
}

/* Toggle Button */
.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--chat-secondary);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    background-color: #00a0bd;
}

.chat-toggle-icon {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: var(--chat-width);
    height: 500px;
    max-height: 80vh;
    background-color: var(--chat-bg);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Header */
.chat-header {
    background-color: var(--chat-primary);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title h3 {
    margin: 0;
    font-size: 1rem;
    color: white;
}

.chat-title span {
    font-size: 0.8rem;
    opacity: 0.8;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    background-color: var(--chat-user-msg-bg);
    color: var(--chat-text);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background-color: var(--chat-secondary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Options Area */
.chat-options {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-btn {
    background: none;
    border: 1px solid var(--chat-secondary);
    color: var(--chat-secondary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background-color: var(--chat-secondary);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .chat-toggle-btn {
        bottom: 15px;
        right: 15px;
    }
}

/* Input Area */
.chat-input-area {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: #fff;
}

#chatInput {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
}

#chatInput:focus {
    border-color: var(--chat-secondary);
}

#chatSend {
    background: var(--chat-secondary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#chatSend:hover {
    background-color: #00a0bd;
}

#chatSend svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
    margin-left: 2px; /* Visual optical adjustment */
}