/* Chatbot Widget Styles */
:root {
    --chat-primary: #3B82F6;
    --chat-bg: #ffffff;
    --chat-text: #333333;
    --chat-user-msg-bg: #3B82F6;
    --chat-user-msg-text: #ffffff;
    --chat-bot-msg-bg: #f3f4f6;
    --chat-bot-msg-text: #1f2937;
}

.chat-widget-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--chat-primary);
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-widget-launcher:hover {
    transform: scale(1.1);
}

.chat-widget-launcher i {
    color: white;
    font-size: 24px;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: var(--chat-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.chat-window.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background: linear-gradient(135deg, var(--chat-primary), #2563EB);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f9fafb;
}

.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

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

.chat-message.bot {
    align-self: flex-start;
    margin-right: auto;
}

.chat-message.user {
    align-self: flex-end;
    margin-left: auto;
}

.message-content {
    padding: 10px 15px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chat-message.bot .message-content {
    background-color: var(--chat-bot-msg-bg);
    color: var(--chat-bot-msg-text);
    border-bottom-left-radius: 2px;
}

.chat-message.user .message-content {
    background-color: var(--chat-user-msg-bg);
    color: var(--chat-user-msg-text);
    border-bottom-right-radius: 2px;
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chat-option-btn {
    background-color: white;
    border: 1px solid var(--chat-primary);
    color: var(--chat-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.chat-input-area {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #eee;
    display: flex; /* Always visible */
    gap: 10px;
}

/* Remove the .show toggle class logic since it's always flex */


.chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
}

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

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

.typing-indicator {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--chat-bot-msg-bg);
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    margin-bottom: 15px;
    display: none;
}

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #9ca3af;
    border-radius: 50%;
    margin-right: 3px;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

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