:root {
    --zalo-blue: #0068ff;
    --zalo-bg: #f1f1f1;
    --zalo-light-bg: #ffffff;
    --zalo-border: #e0e0e0;
    --zalo-radius: 14px;
    --zalo-shadow: 0 8px 24px rgba(0,0,0,0.25);
    --zalo-text: #222;
}

/* NÚT MỞ CHAT (GÓC PHẢI) */
#lcp-launcher {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--zalo-blue);
    color: #fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    cursor:pointer;
    box-shadow: var(--zalo-shadow);
    z-index: 99999;
    transition: 0.2s;
}
#lcp-launcher:hover {
    transform: scale(1.07);
}

/* CỬA SỔ CHAT ZALO */
#lcp-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 340px;
    height: 480px;
    background: var(--zalo-light-bg);
    border-radius: var(--zalo-radius);
    box-shadow: var(--zalo-shadow);
    display:none;
    flex-direction:column;
    overflow:hidden;
    z-index: 99999;
    animation: lcp-popup 0.25s ease;
}

@keyframes lcp-popup {
    from { opacity:0; transform: translateY(10px) scale(0.98); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}

/* HEADER */
#lcp-box-header {
    height: 60px;
    background: var(--zalo-blue);
    color: #fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 0 12px 0 14px;
}

.lcp-header-left {
    display:flex;
    align-items:center;
}
.lcp-header-avatar {
    width:38px;
    height:38px;
    border-radius:50%;
    margin-right:8px;
}
.lcp-header-title {
    font-weight:bold;
    font-size:15px;
}
.lcp-header-sub {
    font-size:12px;
    opacity:0.9;
}

#lcp-box-close {
    font-size:20px;
    cursor:pointer;
    padding:4px;
}
#lcp-box-close:hover {
    opacity:0.8;
}

/* FORM INFO (NAME + EMAIL) */
#lcp-info-form {
    padding:16px;
    text-align:center;
}
#lcp-info-form h3 {
    margin-bottom:6px;
}
#lcp-info-form p {
    font-size:13px;
    color:#666;
    margin-bottom:14px;
}
#lcp-info-form input {
    width:100%;
    padding:9px 12px;
    border-radius:8px;
    border:1px solid #ccc;
    margin-bottom:10px;
    font-size:14px;
}
#lcp-info-form input:focus {
    outline:none;
    border-color:var(--zalo-blue);
}
#lcp-start-chat {
    width:100%;
    padding:9px;
    border:none;
    border-radius:8px;
    background:var(--zalo-blue);
    color:#fff;
    font-weight:bold;
    cursor:pointer;
    font-size:14px;
}
#lcp-start-chat:hover {
    background:#0057d6;
}

/* CHAT CONTENT */
#lcp-chat-content {
    display:flex;
    flex-direction:column;
    height:100%;
}

/* MESSAGES LIST */
#lcp-messages {
    flex:1;
    padding:10px 10px 4px 10px;
    background:#e7ebf0;
    overflow-y:auto;
}

/* SCROLLBAR */
#lcp-messages::-webkit-scrollbar {
    width:6px;
}
#lcp-messages::-webkit-scrollbar-thumb {
    background:#bfc5ce;
    border-radius:4px;
}

/* 1 tin nhắn */
.lcp-msg {
    display:flex;
    margin-bottom:8px;
    max-width:80%;
}

/* KHÁCH (RIGHT, XANH) */
.lcp-right-msg {
    margin-left:auto;
    justify-content:flex-end;
}
.lcp-right-msg .lcp-bubble {
    background:var(--zalo-blue);
    color:#fff;
    border-radius:16px 16px 0 16px;
}

/* ADMIN (LEFT, TRẮNG) */
.lcp-left-msg {
    justify-content:flex-start;
}
.lcp-left-msg .lcp-bubble {
    background:#fff;
    border-radius:16px 16px 16px 0;
    border:1px solid #ddd;
}

.lcp-bubble {
    padding:8px 12px;
    font-size:14px;
    line-height:1.4;
    box-shadow:0 1px 3px rgba(0,0,0,0.12);
    white-space:pre-line;
}

/* ẢNH TRONG BUBBLE */
.lcp-bubble img {
    max-width:220px;
    border-radius:10px;
    display:block;
}

/* TOOLBAR */
#lcp-toolbar {
    background:#fff;
    border-top:1px solid #ddd;
    padding:6px 8px;
    display:flex;
    align-items:center;
    gap:6px;
}
#lcp-toolbar button {
    border:none;
    background:none;
    font-size:22px;
    cursor:pointer;
    padding:4px 6px;
    border-radius:6px;
}
#lcp-toolbar button:hover {
    background:#eef3ff;
}
#lcp-file-input {
    display:none;
}

/* EMOJI PANEL */
#lcp-emoji-panel {
    display:none;
    background:#fff;
    border-top:1px solid #ddd;
    padding:8px 6px;
    max-height:100px;
    overflow-y:auto;
    display:flex;
    flex-wrap:wrap;
}
.lcp-emoji-item {
    font-size:22px;
    margin:4px;
    cursor:pointer;
}

/* INPUT ZONE */
#lcp-input-wrap {
    background:#fff;
    border-top:1px solid #ddd;
    padding:8px 8px 10px 8px;
    display:flex;
    align-items:center;
    gap:8px;
}
#lcp-input {
    flex:1;
    border-radius:20px;
    border:1px solid #ccc;
    padding:8px 12px;
    font-size:14px;
}
#lcp-input:focus {
    outline:none;
    border-color:var(--zalo-blue);
}
#lcp-send {
    padding:8px 14px;
    border-radius:20px;
    border:none;
    background:var(--zalo-blue);
    color:#fff;
    font-size:14px;
    cursor:pointer;
}
#lcp-send:hover {
    background:#0057d6;
}

/* TYPING */
#lcp-typing {
    font-size:12px;
    color:#555;
    padding:4px 10px;
    background:#e7ebf0;
}

/* 3 chấm nhún */
.typing-dots {
    display:inline-block;
    width:20px;
    height:8px;
    position:relative;
}
.typing-dots span {
    position:absolute;
    width:5px;
    height:5px;
    background:#777;
    border-radius:50%;
    animation:lcp-typing 1.2s infinite;
}
.typing-dots span:nth-child(1){ left:0; animation-delay:0s; }
.typing-dots span:nth-child(2){ left:7px; animation-delay:0.2s; }
.typing-dots span:nth-child(3){ left:14px; animation-delay:0.4s; }

@keyframes lcp-typing {
    0% { transform:translateY(0); opacity:0.4; }
    30%{ transform:translateY(-3px); opacity:1; }
    60%{ transform:translateY(0); opacity:0.4; }
    100%{ opacity:0.2; }
}
