#chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #2563eb;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

#chat-widget {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 360px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
    z-index: 9999;
}

/* HEADER */
#chat-header {
    background: linear-gradient(135deg,#2563eb,#1d4ed8);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-weight: 600;
    font-size: 15px;
}

#chat-close {
    cursor: pointer;
    font-size: 18px;
    opacity: .8;
}

/* BODY */
#chat-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: #f5f7fb;
}

/* MESSAGE BLOCK */
.msg-wrap {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.msg-wrap.user { margin-left: auto; align-items: flex-end; }
.msg-wrap.admin { margin-right: auto; align-items: flex-start; }

.msg-author {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

.msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
}

.user .msg-bubble {
    background: #2563eb;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.admin .msg-bubble {
    background: #fff;
    color: #111;
    border: 1px solid #e1e5ec;
    border-bottom-left-radius: 4px;
}

.msg-time {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* INPUT */
#chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e1e5ec;
    background: #fff;
    gap: 8px;
}

#chat-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
}

#chat-input button {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 500;
}
