/* ===== FLOATING ACTION BUTTON ===== */
#slc-chat-fab {
    position: fixed;
    bottom: 10px;
    right: 15px;
    width: 58px;   /* same size as WhatsApp button */
    height: 58px;
    background-color: #cc0000;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 999997;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
#slc-chat-fab:hover {
    transform: scale(1.07);
    background-color: #a30000;
}
/* Icon centered inside circle with breathing room — like WhatsApp */
#slc-chat-fab img {
    width: 68%;
    height: 68%;
    object-fit: contain;
}

/* ===== CHAT WINDOW ===== */
#slc-chat-window {
    position: fixed;
    bottom: 76px;  /* 10px FAB bottom + 50px FAB height + 16px gap */
    right: 15px;
    width: 340px;
    height: 470px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 999998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    opacity: 0;
    transform: translateY(15px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#slc-chat-window.slc-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ===== HEADER ===== */
#slc-chat-header {
    background: #cc0000;
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#slc-header-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#slc-header-info {
    flex: 1;
}
#slc-header-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}
#slc-header-status {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
    min-height: 16px;
}
#slc-chat-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.85;
}
#slc-chat-close:hover { opacity: 1; }

/* ===== BODY ===== */
#slc-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

/* ===== MESSAGES ===== */
.slc-msg-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    clear: both;
}
.slc-msg-wrapper.user { align-items: flex-end; }
.slc-msg-wrapper.admin { align-items: flex-start; }

.slc-msg { 
    padding: 10px 14px; 
    border-radius: 14px; 
    max-width: 80%; 
    font-size: 14px;
    word-wrap: break-word;
    line-height: 1.5;
}
.slc-msg.user { 
    background: #cc0000; 
    color: #ffffff;
    border-bottom-right-radius: 3px;
}
.slc-msg.admin { 
    background: #e8e8e8; 
    color: #222222;
    border-bottom-left-radius: 3px;
}
.slc-msg-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

/* ===== TYPING INDICATOR ===== */
#slc-typing-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #999;
    font-size: 13px;
}
#slc-typing-indicator .slc-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cc0000;
    margin: 0 2px;
    animation: slc-bounce 1.3s infinite ease-in-out;
}
#slc-typing-indicator .slc-dots span:nth-child(2) { animation-delay: 0.2s; }
#slc-typing-indicator .slc-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes slc-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== FOOTER INPUT ===== */
#slc-chat-footer {
    padding: 12px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
#slc-message-input {
    flex: 1;
    padding: 10px 15px;
    border: 1.5px solid #ddd;
    border-radius: 22px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
#slc-message-input:focus { border-color: #cc0000; }
#slc-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #cc0000;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}
#slc-send-btn:hover { background: #a30000; }
#slc-send-btn:active { transform: scale(0.93); }
