/* Live Chat Public Widget - WP Team */
#livechat-widget * { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Floating button */
#livechat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--lc-color, #25D366);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37,211,102,.45);
    font-size: 15px;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s;
}

#livechat-fab:hover { transform: scale(1.05); box-shadow: 0 6px 28px rgba(37,211,102,.55); }

#livechat-fab svg { flex-shrink: 0; }

.lc-fab-badge {
    background: #f44336;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    position: absolute;
    top: -4px;
    right: -4px;
}

/* Chat window */
#livechat-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 360px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    display: none;
    flex-direction: column;
    z-index: 99999;
    overflow: hidden;
    animation: lcSlideIn .25s ease;
}

#livechat-window.lc-open { display: flex; }

@keyframes lcSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.lc-header {
    background: var(--lc-color, #25D366);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.lc-header-info { display: flex; align-items: center; gap: 10px; }

.lc-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.lc-header-text h3 { color: #fff; margin: 0; font-size: 15px; font-weight: 700; }
.lc-header-text p  { color: rgba(255,255,255,.8); margin: 0; font-size: 12px; }
.lc-online-dot     { display: inline-block; width: 7px; height: 7px; background: #fff; border-radius: 50%; margin-right: 4px; animation: pulse 2s infinite; }

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

.lc-close-btn {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    transition: background .2s;
}

.lc-close-btn:hover { background: rgba(255,255,255,.35); }

/* Form */
#lc-pre-form {
    padding: 24px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
}

#lc-pre-form h4 { margin: 0 0 4px; font-size: 18px; color: #1a1a2e; }
#lc-pre-form p { margin: 0 0 8px; color: #666; font-size: 14px; }

.lc-input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

.lc-input:focus { border-color: var(--lc-color, #25D366); }

.lc-start-btn {
    background: var(--lc-color, #25D366);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    width: 100%;
}

.lc-start-btn:hover { opacity: .9; }

/* Messages */
#lc-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-msg { display: flex; gap: 8px; }
.lc-msg-user { flex-direction: row-reverse; }

.lc-msg-bubble {
    max-width: 78%;
    background: #fff;
    border-radius: 12px;
    padding: 9px 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.lc-msg-user .lc-msg-bubble { background: var(--lc-color, #25D366); color: #fff; }
.lc-msg-bot .lc-msg-bubble  { background: #e3f2fd; }

.lc-msg-sender { font-size: 10px; font-weight: 700; text-transform: uppercase; opacity: .6; display: block; margin-bottom: 3px; }
.lc-msg-text   { font-size: 14px; line-height: 1.5; margin: 0; word-break: break-word; }
.lc-msg-time   { font-size: 10px; opacity: .5; display: block; margin-top: 3px; }

.lc-typing { display: flex; align-items: center; gap: 4px; padding: 6px 2px; }
.lc-typing span { width: 7px; height: 7px; background: #aaa; border-radius: 50%; animation: lcBounce 1.2s infinite; }
.lc-typing span:nth-child(2) { animation-delay: .2s; }
.lc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes lcBounce { 0%,80%,100% { transform: scale(0); } 40% { transform: scale(1); } }

/* Input area */
#lc-input-area {
    padding: 12px 14px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #fff;
    flex-shrink: 0;
}

#lc-message-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 80px;
    overflow-y: auto;
    transition: border-color .2s;
    font-family: inherit;
    line-height: 1.4;
}

#lc-message-input:focus { border-color: var(--lc-color, #25D366); }

#lc-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--lc-color, #25D366);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .2s;
}

#lc-send-btn:hover { opacity: .85; }

.lc-powered {
    text-align: center;
    font-size: 10px;
    color: #bbb;
    padding: 6px;
    background: #fff;
    flex-shrink: 0;
}

/* Elementor trigger button */
.livechat-elementor-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37,211,102,.4);
    transition: transform .2s;
}

.livechat-elementor-btn:hover { transform: scale(1.04); }

@media (max-width: 420px) {
    #livechat-window { width: calc(100vw - 20px); right: 10px; bottom: 80px; height: 480px; }
    #livechat-fab { right: 16px; bottom: 16px; }
}
