:root {
    --primary-color: #0032e3;
    --secondary-color: #00f857;
    --bg-color: #303030;
    --chat-bg: #e5ddd5;
    --user-bubble: #00f857;
    --bot-bubble: #ffffff;
    --text-color: #333;
    --shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: transparent;
}

/* Launcher */
#chat-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

#chat-launcher:hover {
    transform: scale(1.1);
}

#chat-launcher i {
    color: #0032e3;
    font-size: 32px;
}

/* Chat Window */
#chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    max-height: calc(100dvh - 110px);
    background-color: var(--bg-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: var(--transition);
    overflow: hidden;
}

#chat-window.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Mobile Viewports */
@media (max-width: 600px) {
    #chat-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }
}

/* Header */
#chat-header {
    background-color: #303030;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chat-header .title {
    font-weight: 600;
    font-size: 1.1rem;
}

#chat-header #close-chat {
    cursor: pointer;
    font-size: 24px;
}

/* Messaging Area */
#chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #e7e7e7;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14.5px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    color: #303030;
}

.message.user {
    align-self: flex-end;
    background-color: #fff;
    border-top-right-radius: 2px;
    color: #0032e3;
}

.message.bot {
    align-self: flex-start;
    background-color: var(--bot-bubble);
    border-top-left-radius: 2px;
}

.message img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: 4px;
    display: block;
}

/* Typing Indicator */
#typing-indicator {
    display: none;
    align-self: flex-start;
    background-color: var(--bot-bubble);
    padding: 8px 12px;
    border-radius: 8px;
    border-top-left-radius: 2px;
    font-size: 12px;
    color: #666;
}

/* Preview Area */
#preview-area {
    display: none;
    padding: 8px 16px;
    background: white;
    border-top: 1px solid #eee;
    position: relative;
}

#preview-thumbs{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
}

#preview-thumbs img{
    width:60px;
    height:60px;
    object-fit:cover;
    border-radius:6px;
    display:block;
}
#remove-preview {
    position: absolute;
    top: 6px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

#image-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

/* Input Area */
#chat-input-area {
    background-color: #303030;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-input {
    flex: 1;
    border: none;
    background: #f0f2f5;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    color: #0032e3;
}

.icon-btn {
    background: none;
    border: none;
    color: #e5e5e5;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #ffffff;
}

#send-btn {
    color: #fff;
}

/* Utilities */
.hidden {
    display: none !important;
}