:root {
    --chat-primary-color: #4F46E5;
    --chat-primary-hover: #4338CA;
    --chat-bg-color: #F3F4F6;
    --chat-window-bg: #FFFFFF;
    --chat-user-msg-bg: #4F46E5;
    --chat-user-msg-text: #FFFFFF;
    --chat-bot-msg-bg: #F3F4F6;
    --chat-bot-msg-text: #1F2937;
    --chat-text-color: #111827;
    --chat-secondary-text: #6B7280;
    --chat-border-radius: 16px;
}

/* Chat Wrapper - Floating Widget */
.chat-wrapper {
    width: 350px;
    height: 500px;
    background-color: var(--chat-window-bg);
    border-radius: var(--chat-border-radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
    display: none;
    /* Hidden by default */
    font-family: 'Inter', sans-serif;
    border: 1px solid #E5E7EB;
}

/* Toggle Button */
.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--chat-primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease, background-color 0.3s;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    background-color: var(--chat-primary-hover);
}

/* Mute Button */
.chat-wrapper .mute-btn {
    background: none;
    border: none;
    color: var(--chat-secondary-text);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: color 0.2s;
    margin-left: auto;
}

.chat-wrapper .mute-btn:hover {
    color: var(--chat-primary-color);
}

/* Header */
.chat-wrapper .chat-header {
    background-color: var(--chat-window-bg);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.chat-wrapper .header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-wrapper .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #E0E7FF;
}

.chat-wrapper .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-wrapper .header-info h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--chat-text-color);
    margin: 0;
}

.chat-wrapper .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    margin-right: 4px;
}

.chat-wrapper .status-text {
    font-size: 0.75rem;
    color: var(--chat-secondary-text);
}

/* Chat Container */
.chat-wrapper .chat-container {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #FAFAFA;
}

.chat-wrapper .message {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-wrapper .message-content {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.chat-wrapper .bot-message {
    align-self: flex-start;
}

.chat-wrapper .bot-message .message-content {
    background-color: var(--chat-bot-msg-bg);
    color: var(--chat-bot-msg-text);
    border-bottom-left-radius: 4px;
}

.chat-wrapper .user-message {
    align-self: flex-end;
}

.chat-wrapper .user-message .message-content {
    background-color: var(--chat-user-msg-bg);
    color: var(--chat-user-msg-text);
    border-bottom-right-radius: 4px;
}

.chat-wrapper .message-time {
    font-size: 0.7rem;
    color: #9CA3AF;
    margin-top: 4px;
    align-self: flex-end;
}

.chat-wrapper .bot-message .message-time {
    align-self: flex-start;
}

/* Input Area */
.chat-wrapper .input-area {
    padding: 1rem 1.5rem;
    background-color: var(--chat-window-bg);
    border-top: 1px solid #E5E7EB;
}

.chat-wrapper .chat-form {
    display: flex;
    gap: 0.75rem;
    background-color: var(--chat-bg-color);
    padding: 0.5rem;
    border-radius: 24px;
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-wrapper .chat-form:focus-within {
    border-color: var(--chat-primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

.chat-wrapper .chat-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    outline: none;
    color: var(--chat-text-color);
    padding: 0.5rem 0.75rem;
    background-color: var(--chat-bot-msg-bg);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.chat-wrapper .typing-dot {
    width: 6px;
    height: 6px;
    background-color: #6B7280;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chat-wrapper .chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-wrapper .chat-container::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 20px;
}