@keyframes cs-live-enter { 0% { opacity: 0; transform: scale(.8); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cs-live-spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes cs-live-sweep { 0% { opacity: 0; } 10% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cs-live-ping { 0% { transform: scale(1); opacity: .7; } 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes cs-live-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes cs-live-fade { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes cs-live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.cs-live-chat { position: relative; isolation: isolate; border-width: 0; background: transparent; animation: cs-live-enter .55s cubic-bezier(.2, .9, .3, 1.25) backwards; }
.cs-live-chat:hover { background: transparent; }
.cs-live-chat__ring { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: 12px; background: #22c55e80; pointer-events: none; }
.cs-live-chat__ring::before { content: ""; position: absolute; left: 50%; top: 50%; width: 220%; aspect-ratio: 1; opacity: 0; transform: translate(-50%, -50%) rotate(0deg); background: conic-gradient(from 0deg, transparent 0 60%, #22c55e 80%, #dcfce7 87%, transparent 93%); animation: cs-live-spin 1.8s linear .3s 2 both, cs-live-sweep 3.9s ease .3s both; }
.cs-live-chat__ring::after { content: ""; position: absolute; inset: 1px; border-radius: 11px; background: #262826; transition: background-color .2s; }
.cs-live-chat:hover .cs-live-chat__ring::after { background: #1f2f24; }
.cs-live-chat .material-symbols-outlined { color: #86efac; }
.cs-live-chat__tag { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 6px; border-radius: 999px; background: #22c55e; color: #052e14; font-size: 9.5px; font-weight: 800; line-height: 13px; letter-spacing: .09em; white-space: nowrap; box-shadow: 0 0 0 3px #161616; pointer-events: none; }
.ld-dealer .cs-live-chat__tag { top: -12px; }
.cs-live-chat__tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: cs-live-blink 1.6s ease-in-out infinite; }

#chat_open.cs-live-chat, #chat_open.cs-live-chat:hover { border-width: 0; background: transparent; }
.cs-live-chat--light, .cs-live-chat--light:hover,
#chat_open.cs-live-chat--light, #chat_open.cs-live-chat--light:hover { color: #111827; }
.cs-live-chat--light .cs-live-chat__ring::after { background: #fff; }
.cs-live-chat--light:hover .cs-live-chat__ring::after { background: #f0fdf4; }
.cs-live-chat--light .material-symbols-outlined { color: #16a34a; }
.cs-live-chat--light .cs-live-chat__tag { box-shadow: 0 0 0 3px #fff; }

.cs-live-status { display: none; align-items: center; gap: 6px; color: #15803d; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; vertical-align: middle; }
.cs-live-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.cs-live-status--dark { margin-left: 8px; color: #4ade80; }
.cs-live-status--dark::before { background: #4ade80; }
.ld-dealer:has(.cs-live-chat:not(.hidden)) .cs-live-status,
#seller-info-main:has(.cs-live-chat:not(.hidden)) .cs-live-status { display: inline-flex; animation: cs-live-fade .5s ease .15s backwards; }

.ld-dealer .ld-dealer__online { position: absolute; right: -4px; bottom: -4px; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #161616; }
.ld-dealer .ld-dealer__online::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: cs-live-ping 2.2s cubic-bezier(0, 0, .2, 1) .5s infinite; }
.ld-dealer:has(.cs-live-chat:not(.hidden)) .ld-dealer__online { display: block !important; animation: cs-live-pop .5s cubic-bezier(.2, .9, .3, 1.4) backwards; }

@media (prefers-reduced-motion: reduce) {
    .cs-live-chat, .cs-live-chat__tag::before, .cs-live-status, .ld-dealer .ld-dealer__online, .ld-dealer .ld-dealer__online::after { animation: none !important; }
    .cs-live-chat__ring::before { display: none; }
}
