.nylc-widget {
    position: fixed;
    right: 20px;
    bottom: 80px; /* tránh chồng với nút toggle */
    width: 320px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    font-family: system-ui, sans-serif;
    z-index: 99999;
}
.nylc-widget h4 {
    margin: 0;
    padding: 12px 14px;
    background: #f5f7fb;
    border-bottom: 1px solid #eee;
}
.nylc-form {
    padding: 12px 14px;
}
.nylc-form label {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}
.nylc-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.nylc-form button {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.nylc-form button:hover {
    background: #333;
}
.nylc-form .nylc-tip {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* Chat box */
.nylc-chat {
    display: flex;
    flex-direction: column;
    height: 420px;
}
.nylc-messages {
    flex: 1;
    overflow: auto;
    padding: 10px;
    background: #fafafa;
}
.nylc-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}
.nylc-row .who {
    font-size: 11px;
    color: #999;
}
.nylc-row .txt {
    background: #fff;
    border: 1px solid #eee;
    padding: 8px 10px;
    border-radius: 10px;
}
.nylc-row.customer .txt {
    background: #e9f5ff;
}
.nylc-row .time {
    font-size: 10px;
    color: #aaa;
}

/* Input & send */
.nylc-input {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee;
}
.nylc-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
}
.nylc-input button {
    min-width: 50px;
    height: 1px;
    border: none;
    border-radius: 10%;
    background: #111;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
}
.nylc-input button::after {
    content: "➤"; /* icon gửi */
    font-size: 14px;
}
.nylc-input button:hover {
    background: #333;
    transform: scale(1.05);
}

/* Toggle button */
.nylc-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 99998;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.1s;
}
.nylc-toggle::before {
    content: "💬"; /* icon chat */
}
.nylc-toggle:hover {
    background: #333;
    transform: scale(1.05);
}
