#lc-widget-trigger,
#lc-widget-panel {
    --ig-grad: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    box-sizing: border-box;
    font-family: Nunito, system-ui, sans-serif;
}
#lc-widget-trigger *,
#lc-widget-panel * { box-sizing: border-box; }

#lc-widget-trigger {
    position: fixed; bottom: 26px; right: 26px;
    width: 60px; height: 60px; border-radius: 50%;
    border: none !important; cursor: pointer; z-index: 1049;
    background: var(--ig-grad) !important;
    box-shadow: 0 10px 36px rgba(131,58,180,0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 0 !important; outline: none;
}
#lc-widget-trigger:hover { transform: scale(1.08); }
#lc-widget-trigger .lcw-logo {
    width: 30px; height: 30px; object-fit: contain; border-radius: 50%; z-index: 1; position: relative;
}
#lc-widget-trigger::before, #lc-widget-trigger::after {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 1.5px solid rgba(131,58,180,0.40); animation: lcwPulse 3s ease-out infinite; pointer-events: none;
}
#lc-widget-trigger::after { inset: -14px; border-color: rgba(253,29,29,0.20); animation-delay: 1.1s; }
@keyframes lcwPulse { 0% { transform: scale(1); opacity: .9; } 65% { transform: scale(1.3); opacity: 0; } 100% { transform: scale(1.3); opacity: 0; } }
#lcw-unread {
    position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 4px;
    border-radius: 10px; background: #EF4444; color: #fff; font-size: 10px; font-weight: 700;
    display: none; align-items: center; justify-content: center;
}

#lcw-teaser {
    position: fixed; bottom: 36px; right: 98px; z-index: 1048;
    appearance: none; border: none; cursor: pointer;
    background: #1c1c28; color: #fff;
    padding: 10px 16px 10px 14px; border-radius: 16px 16px 4px 16px;
    font-family: Nunito, system-ui, sans-serif; font-size: 13px; font-weight: 800;
    box-shadow: 0 12px 32px rgba(131,58,180,.35);
    display: flex; align-items: center; gap: 8px;
    opacity: 0; transform: translateX(12px) scale(.96);
    pointer-events: none; animation: none;
}
#lcw-teaser.show {
    opacity: 1; transform: translateX(0) scale(1);
    pointer-events: auto;
    animation: lcwTeaserIn .55s cubic-bezier(.2,.8,.2,1), lcwTeaserFloat 2.8s ease-in-out .55s infinite;
}
#lcw-teaser.hidden { display: none !important; }
#lcw-teaser .lcw-teaser-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6);
    animation: lcwDotPulse 1.6s ease-out infinite;
}
@keyframes lcwTeaserIn {
    from { opacity: 0; transform: translateX(18px) scale(.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes lcwTeaserFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
@keyframes lcwDotPulse {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
    70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

#lc-widget-panel .lcw-typing {
    align-self: flex-start;
    display: flex; gap: 5px; align-items: center;
    background: #1c1c28; border-radius: 14px;
    padding: 10px 14px; margin: 2px 0 8px;
}
#lc-widget-panel .lcw-typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    animation: lcwBounce 1.1s ease-in-out infinite;
}
#lc-widget-panel .lcw-typing span:nth-child(2) { animation-delay: .15s; }
#lc-widget-panel .lcw-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes lcwBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .45; }
    40% { transform: translateY(-5px); opacity: 1; }
}


#lc-widget-panel {
    position: fixed; bottom: 96px; right: 26px;
    width: 380px; height: min(580px, calc(100vh - 120px));
    border-radius: 20px; background: #12121a !important; color: #F0ECF8 !important;
    box-shadow: 0 28px 70px rgba(0,0,0,.7), 0 0 0 1px rgba(131,58,180,.18);
    z-index: 1050; display: none; flex-direction: column; overflow: hidden;
}
#lc-widget-panel.open { display: flex; }

#lc-widget-panel .lcw-header {
    background: var(--ig-grad) !important; padding: 12px 14px;
    display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#lc-widget-panel .lcw-header img {
    width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: contain; flex-shrink: 0;
}
#lc-widget-panel .lcw-header h3 { margin: 0; font-size: 15px; font-weight: 800; color: #fff !important; }
#lc-widget-panel .lcw-header p { margin: 0; font-size: 11px; color: rgba(255,255,255,.88) !important; }
#lc-widget-panel .lcw-header-new {
    margin-left: auto; background: rgba(255,255,255,.2) !important; border: none !important;
    color: #fff !important; width: 32px; height: 32px; border-radius: 50% !important;
    cursor: pointer; flex-shrink: 0; padding: 0 !important;
}
#lc-widget-panel .lcw-header-close {
    margin-left: 6px; background: rgba(255,255,255,.2) !important; border: none !important;
    color: #fff !important; width: 32px; height: 32px; border-radius: 50% !important;
    cursor: pointer; flex-shrink: 0; padding: 0 !important;
}
#lc-widget-panel .lcw-closed-bar {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 12px; margin-top: auto;
}
#lc-widget-panel .lcw-closed-bar p { margin: 0; color: #8B82A0 !important; font-size: 12px; text-align: center; }
#lc-widget-panel .lcw-newchat {
    appearance: none !important;
    background: var(--ig-grad) !important; border: none !important; color: #fff !important;
    border-radius: 12px !important; padding: 12px 16px !important; font-weight: 800 !important;
    font-size: 13px !important; cursor: pointer; min-height: 44px !important; width: 100%;
}
#lc-widget-panel.lcw-is-closed .lcw-choices { display: none !important; }


#lc-widget-panel .lcw-quick-bar {
    display: flex; flex-wrap: nowrap; gap: 8px; padding: 10px 12px;
    overflow-x: auto; overflow-y: hidden; background: #12121a !important;
    border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
    scrollbar-width: thin;
}
#lc-widget-panel .lcw-chip {
    appearance: none !important; -webkit-appearance: none !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    background: #1c1c28 !important; background-image: none !important;
    color: #F0ECF8 !important; border-radius: 999px !important;
    padding: 8px 14px !important; font-size: 12px !important; font-weight: 700 !important;
    line-height: 1.3 !important; cursor: pointer; min-height: 36px !important; height: auto !important;
    white-space: nowrap; flex-shrink: 0; box-shadow: none !important; text-transform: none !important;
}
#lc-widget-panel .lcw-chip:hover {
    background: var(--ig-grad) !important; border-color: transparent !important; color: #fff !important;
}

#lc-widget-panel .lcw-body {
    flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px;
    background: #12121a !important; min-height: 0;
}
#lc-widget-panel .lcw-prechat { display: flex; flex-direction: column; gap: 10px; }
#lc-widget-panel .lcw-hello { margin: 0; color: #C4B8D9 !important; font-size: 13px; line-height: 1.5; }
#lc-widget-panel .lcw-lead-hint { margin: 0; color: #8B82A0 !important; font-size: 12px; }

#lc-widget-panel .lcw-prechat input,
#lc-widget-panel .lcw-prechat input[type="text"],
#lc-widget-panel .lcw-prechat input[type="email"] {
    appearance: none !important;
    background: #1c1c28 !important; background-color: #1c1c28 !important;
    border: 1px solid rgba(255,255,255,.12) !important; border-radius: 12px !important;
    color: #F0ECF8 !important; padding: 12px 14px !important; font-size: 16px !important;
    min-height: 46px !important; width: 100% !important; box-shadow: none !important; outline: none !important;
}
#lc-widget-panel .lcw-prechat input::placeholder { color: #7A7194 !important; opacity: 1 !important; }
#lc-widget-panel .lcw-prechat input:focus {
    border-color: rgba(131,58,180,.7) !important; box-shadow: 0 0 0 3px rgba(131,58,180,.2) !important;
}

#lc-widget-panel #lcw-start,
#lc-widget-panel .lcw-send {
    appearance: none !important;
    background: var(--ig-grad) !important; background-image: var(--ig-grad) !important;
    border: none !important; color: #fff !important; border-radius: 12px !important;
    padding: 12px 14px !important; font-weight: 800 !important; font-size: 14px !important;
    cursor: pointer; min-height: 46px !important; width: 100%;
    box-shadow: none !important; text-transform: none !important;
}
#lc-widget-panel #lcw-start:disabled {
    opacity: 0.65 !important;
    cursor: wait !important;
    pointer-events: none !important;
}
#lc-widget-panel .lcw-send { width: auto; min-width: 76px; flex-shrink: 0; }
#lc-widget-panel .lcw-err { color: #fca5a5 !important; font-size: 12px; }

#lc-widget-panel .lcw-msg {
    max-width: 86%; padding: 8px 12px; border-radius: 14px;
    font-size: 13px; line-height: 1.45; word-wrap: break-word; color: #F0ECF8 !important;
}
#lc-widget-panel .lcw-msg.visitor { align-self: flex-end; background: var(--ig-grad) !important; color: #fff !important; }
#lc-widget-panel .lcw-msg.agent { align-self: flex-start; background: #1c1c28 !important; }
#lc-widget-panel .lcw-msg.system { align-self: center; background: transparent !important; color: #8B82A0 !important; font-size: 11px; }
#lc-widget-panel .lcw-msg.lcw-html a { color: #fcb045 !important; font-weight: 700; }
#lc-widget-panel .lcw-msg.lcw-html p { margin: 0 0 8px; color: inherit !important; }
#lc-widget-panel .lcw-msg.lcw-html p:last-child { margin: 0; }

#lc-widget-panel .lcw-footer {
    display: flex; gap: 8px; padding: 10px 12px max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.08); background: #12121a !important; flex-shrink: 0;
}
#lc-widget-panel .lcw-footer textarea {
    flex: 1; resize: none; min-height: 44px; max-height: 90px;
    background: #1c1c28 !important; border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 12px !important; color: #F0ECF8 !important;
    padding: 10px 12px !important; font-size: 16px !important; outline: none !important;
}

@media (max-width: 576px) {
    #lc-widget-panel {
        right: 0; left: 0; bottom: 0; width: 100%; height: 100%; max-height: 100%; border-radius: 0;
    }
    #lc-widget-trigger { bottom: max(16px, env(safe-area-inset-bottom)); right: 16px; }
}
#lc-widget-panel .lcw-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 10px;
    align-self: flex-end;
    justify-content: flex-end;
    max-width: 100%;
}
#lc-widget-panel .lcw-choices .lcw-chip {
    appearance: none !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    background: #1c1c28 !important;
    color: #F0ECF8 !important;
    border-radius: 999px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer;
    min-height: 36px !important;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    box-shadow: none !important;
}
#lc-widget-panel .lcw-choices .lcw-chip:hover {
    background: var(--ig-grad) !important;
    border-color: transparent !important;
    color: #fff !important;
}
#lcw-confirm {
    position: fixed; inset: 0; z-index: 11000;
    display: none; align-items: center; justify-content: center;
    background: rgba(8,8,14,.62); backdrop-filter: blur(8px);
    font-family: Nunito, system-ui, sans-serif;
}
#lcw-confirm.open { display: flex; }
#lcw-confirm .lcw-confirm-box {
    width: min(420px, calc(100vw - 32px));
    background: #16161f; color: #F0ECF8;
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 28px 70px rgba(0,0,0,.55);
    border: 1px solid rgba(131,58,180,.28);
}
#lcw-confirm .lcw-confirm-hd {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    padding: 14px 16px; font-weight: 800; font-size: 15px; color: #fff;
}
#lcw-confirm .lcw-confirm-bd { padding: 16px; font-size: 14px; line-height: 1.5; color: #C4B8D9; }
#lcw-confirm .lcw-confirm-ft { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
#lcw-confirm .lcw-confirm-ft button {
    appearance: none; border: none; border-radius: 12px; cursor: pointer;
    font-weight: 800; font-size: 13px; min-height: 40px; padding: 0 16px;
}
#lcw-confirm-no { background: #2a2a38; color: #fff; }
#lcw-confirm-yes { background: linear-gradient(135deg, #833ab4, #E91E63); color: #fff; }


