/* HIDE THE OLD TRIGGER BUTTON (Replaced by Robot) */
#uv-chat-trigger {
    display: none !important;
}

/* --- Chat Box Styling (Position adjusted for Robot) --- */
#uv-chat-box {
    position: fixed;
    bottom: 90px; /* Above the robot trigger area */
    right: 90px;  /* To the left of the robot */
    width: 380px; 
    height: 550px; 
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    font-family: 'Montserrat', sans-serif;
    animation: uvSlideUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Header */
.uv-chat-header {
    background: linear-gradient(135deg, #003D3F 0%, #002526 100%);
    color: #fff;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.uv-header-info { display: flex; flex-direction: column; }
.uv-header-info strong { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.uv-online-status { font-size: 11px; color: #00ff88; margin-top: 2px; font-weight: 600; text-transform: uppercase; }
.uv-close-chat { background: none; border: none; color: #fff; font-size: 30px; cursor: pointer; line-height: 1; opacity: 0.8; transition: 0.2s; padding: 0; }
.uv-close-chat:hover { opacity: 1; transform: scale(1.1); }

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

#uv-chat-messages::-webkit-scrollbar { width: 6px; }
#uv-chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

/* Chat Bubbles */
.uv-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    animation: uvMsgFade 0.3s ease;
}

/* Bot Message */
.uv-msg.bot {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid #eee;
}

/* User Message */
.uv-msg.user {
    background: #003D3F;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    box-shadow: 0 4px 10px rgba(0, 61, 63, 0.2);
}

.uv-msg.error { background: #ffebee; color: #c62828; font-weight: 600; align-self: center; font-size: 12px; }

/* Input Area */
.uv-chat-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: center;
}
#uv-chat-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 14px;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.2s;
    background: #f9fafb;
}
#uv-chat-input:focus { border-color: #003D3F; background: #fff; box-shadow: 0 0 0 3px rgba(0, 61, 63, 0.1); }

/* Send Button */
#uv-send-btn {
    background: #003D3F;
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0, 61, 63, 0.2);
}
#uv-send-btn:hover { background: #005052; transform: scale(1.1) rotate(-10deg); }

/* Animations */
@keyframes uvPopIn { 0% {transform: scale(0) translateY(100px);} 70% {transform: scale(1.1) translateY(-10px);} 100% {transform: scale(1) translateY(0);} }
@keyframes uvSlideUp { from{opacity:0; transform: translateY(30px);} to{opacity:1; transform: translateY(0);} }
@keyframes uvMsgFade { from{opacity:0; transform: translateY(10px);} to{opacity:1; transform: translateY(0);} }

/* --- Mobile Responsive --- */
@media (max-width: 480px) {
    #uv-chat-box {
        width: 92%;
        right: 4%;
        left: 4%;
        bottom: 90px;
        height: 70vh; 
        border-radius: 16px;
    }
}