.chat-container{
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    background: #f9f9fb;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.15);
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    color: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
}

.chat-container.hide{
    transform: translateY(20px);
    opacity: 0;
}

.chat-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: #fff;
    border-bottom: 1px solid #e0e0e5;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-radius: 16px 16px 0 0;
}

.chat-header-left{
    display:flex;
    align-items:center;
    gap:8px;
}

.chat-status-bullet{
    width:10px;
    height:10px;
    border-radius:50%;
    background:#f00;
    box-shadow:0 0 6px #f00;
}

.chat-status-text{
    font-size:12px;
    font-weight:500;
    color:#f00;
}

.chat-messages{
    flex:1;
    padding: 14px;
    display:flex;
    flex-direction:column;
    gap:12px;
    overflow-y:auto;
    background: #f9f9fb;
}

.chat-message{
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 20px;
    position: relative;
    line-height: 1.4;
    word-break: break-word;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-message.show{
    opacity:1;
    transform:none;
}

.chat-message.inbox{
    align-self: flex-start;
    background: #e3e8ff;
    color:#0d1a38;
    box-shadow: 0 4px 12px rgba(0,30,100,0.15);
    font-size: 14px;
    text-align: left;
}

.chat-message.outbox{
    align-self: flex-end;
    background: #5aa7ff;
    color: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(55,111,214,0.2);
    font-size: 14px;
    text-align: right;
}

.chat-message .meta{
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

#chat-toggle{
    background:transparent;
    border:none;
    color:#333;
    font-size:18px;
    cursor:pointer;
}

#chat-toggle:hover{
    color:#5aa7ff !important;
}

.chat-input-bar{
    display:flex;
    padding:12px;
    gap:8px;
    background:#fff;
    border-top:1px solid #e0e0e5;
}

.chat-input{
    flex:1;
    border-radius: 12px;
    border:1px solid #d4d4d8;
    background: #f2f2f7;
    color: #333;
    padding:10px 12px;
    resize:none;
    outline:none;
}

#sendBtn{
    background: #5aa7ff;
    color:#fff;
    border:none;
    border-radius:12px;
    padding:8px 16px;
    font-weight:600;
    cursor:pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#sendBtn:hover{
    transform: translateY(-1px); 
    box-shadow:0 6px 18px rgba(55,111,214,0.25);
}

#typing-indicator{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:4px;
    padding-left:12px;
    margin-bottom:4px;
}

#typing-indicator span.dot{
    width:6px; 
    height:6px; 
    border-radius:50%;
    background:#5aa7ff;
    opacity:0.5;
    animation: blink 1.2s infinite;
}
#typing-indicator span.dot:nth-child(2){ animation-delay:0.2s;}
#typing-indicator span.dot:nth-child(3){ animation-delay:0.4s;}
@keyframes blink{
    0%,80%,100%{opacity:0.3;}
    40%{opacity:1;}
}

.hide { display: none !important; }

#chat-toggle-btn{
    position:fixed;bottom:5px;
    right:5px;z-index:9999;
    background:#5aa7ff;
    color:white;
    border:none;border-radius:50%;width:50px;
    height:50px;font-size:20px;cursor:pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#chat-toggle-btn:hover{
    background:#376fd6 !important;
}

#sendBtn i, .chat-toggle-btn i{
    pointer-events: none;
    font-size: 16px;
    color: #fff;
}
