#lcw-widget-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#lcw-tag {
    position: absolute;
    bottom: 22px;
    right: 78px;
    background: #fff;
    color: #111827;
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    animation: lcw-tag-bounce 2.5s ease-in-out infinite;
}

#lcw-tag.lcw-hidden {
    display: none !important;
}

.lcw-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    flex-shrink: 0;
    animation: lcw-pulse 1.6s infinite;
}

#lcw-tag-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    margin-left: 2px;
    padding: 0;
}

@keyframes lcw-tag-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes lcw-pulse {
    0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.6); }
    70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); }
    100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

#lcw-toggle-btn {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(22,163,74,0.45), 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#lcw-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(22,163,74,0.55), 0 3px 8px rgba(0,0,0,0.2);
}

#lcw-toggle-btn svg {
    width: 30px;
    height: 30px;
}

#lcw-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    max-height: 460px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#lcw-chat-window.lcw-hidden,
#lcw-pre-chat-form.lcw-hidden,
#lcw-messages.lcw-hidden,
#lcw-message-form.lcw-hidden {
    display: none !important;
}

#lcw-chat-header {
    background: #16a34a;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#lcw-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

#lcw-pre-chat-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#lcw-pre-chat-form input {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

#lcw-start-chat-btn,
#lcw-message-form button {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 9px;
    border-radius: 6px;
    cursor: pointer;
}

#lcw-messages {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lcw-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.lcw-msg-visitor {
    align-self: flex-end;
    background: #16a34a;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.lcw-msg-agent {
    align-self: flex-start;
    background: #f1f5f9;
    color: #111827;
    border-bottom-left-radius: 2px;
}

#lcw-message-form {
    display: flex;
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    gap: 8px;
}

#lcw-message-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

#lcw-footer {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
}

#lcw-footer strong {
    color: #6b7280;
    font-weight: 600;
}

#lcw-footer a {
    color: #6b7280;
    text-decoration: none;
}

#lcw-footer a:hover {
    color: #16a34a;
}
