/* 1StopLA AI customer service widget */
.oslachat, .oslachat * { box-sizing: border-box; }
.oslachat { --oc-blue: var(--blue, #0d56ee); --oc-blue-h: var(--blue-h, #0a47c7); --oc-text: #1d1d1f; --oc-sub: #6e6e73; --oc-line: rgba(0, 0, 0, .1); --oc-me: #0d56ee; --oc-bot: #f2f2f5; font-size: 15px; line-height: 1.45; letter-spacing: 0; color: var(--oc-text); }

/* launcher */
.oslachat-btn { position: fixed; z-index: 1040; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; background: var(--oc-blue); color: #fff; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; box-shadow: 0 6px 20px rgba(13, 86, 238, .32), 0 1px 3px rgba(0, 0, 0, .12); transition: background .15s, transform .15s; }
.oslachat-btn:hover { background: var(--oc-blue-h); }
.oslachat-btn:active { transform: scale(.97); }
.oslachat-btn:focus-visible, .oslachat button:focus-visible, .oslachat textarea:focus-visible, .oslachat a:focus-visible { outline: 3px solid #4b9afe; outline-offset: 2px; }
.oslachat-btn svg { width: 22px; height: 22px; flex: none; }
.oslachat.is-open .oslachat-btn { display: none; }
body.site .back-to-top-link { bottom: 84px; }
html.oslachat-open .back-to-top-link { display: none; }

/* panel */
.oslachat-panel { position: fixed; z-index: 1041; right: 20px; bottom: 20px; width: 380px; height: min(620px, calc(100vh - 40px)); display: none; flex-direction: column; overflow: hidden; background: #fff; border-radius: 18px; box-shadow: 0 18px 60px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .06); }
.oslachat.is-open .oslachat-panel { display: flex; animation: oslachat-in .18s ease-out; }
@keyframes oslachat-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.oslachat-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--oc-line); }
.oslachat-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: #eaf2ff; display: grid; place-items: center; color: var(--oc-blue); }
.oslachat-avatar svg { width: 20px; height: 20px; }
.oslachat-title { flex: 1; min-width: 0; }
.oslachat-title strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.2; }
.oslachat-title span { display: block; font-size: 12.5px; color: var(--oc-sub); }
.oslachat-icon { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--oc-sub); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.oslachat-icon:hover { background: var(--oc-bot); color: var(--oc-text); text-decoration: none; }
.oslachat-icon svg { width: 20px; height: 20px; }

.oslachat-note { margin: 0; padding: 8px 16px; font-size: 12px; line-height: 1.4; color: var(--oc-sub); background: #fafafc; border-bottom: 1px solid var(--oc-line); }
.oslachat-note a { color: var(--oc-blue); }

.oslachat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.oslachat-msg { max-width: 86%; padding: 9px 13px; border-radius: 16px; white-space: normal; overflow-wrap: anywhere; }
.oslachat-msg.bot { align-self: flex-start; background: var(--oc-bot); border-bottom-left-radius: 5px; }
.oslachat-msg.me { align-self: flex-end; background: var(--oc-me); color: #fff; border-bottom-right-radius: 5px; }
.oslachat-msg.warn { background: #fff4e5; box-shadow: inset 3px 0 0 #e8590c; }
.oslachat-msg a { color: var(--oc-blue); text-decoration: underline; text-underline-offset: .15em; }
.oslachat-msg.me a { color: #fff; }
.oslachat-ref { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 10px; background: #e6f4ea; color: #1e6b34; font-size: 13px; font-weight: 600; }
.oslachat-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--oc-bot); }
.oslachat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a9aa0; animation: oslachat-dot 1.2s infinite ease-in-out; }
.oslachat-typing i:nth-child(2) { animation-delay: .15s; }
.oslachat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes oslachat-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.oslachat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.oslachat-chips[hidden] { display: none; }
.oslachat-chip { padding: 6px 12px; border: 1px solid #c9dcff; border-radius: 16px; background: #fff; color: var(--oc-blue); font: inherit; font-size: 14px; cursor: pointer; }
.oslachat-chip:hover { background: #eaf2ff; }

.oslachat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--oc-line); }
.oslachat-form textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 9px 14px; border: 1px solid #d2d2d7; border-radius: 20px; font: inherit; font-size: 16px; line-height: 1.35; resize: none; color: var(--oc-text); background: #fff; }
.oslachat-form textarea:focus { border-color: var(--oc-blue); outline: none; box-shadow: 0 0 0 3px rgba(13, 86, 238, .15); }
.oslachat-send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--oc-blue); color: #fff; display: grid; place-items: center; cursor: pointer; }
.oslachat-send:disabled { background: #c7c7cc; cursor: default; }
.oslachat-send svg { width: 18px; height: 18px; }
.oslachat-count { position: absolute; right: 64px; bottom: calc(52px + env(safe-area-inset-bottom)); font-size: 11px; color: var(--oc-sub); }
.oslachat-count[hidden] { display: none; }
.oslachat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

html[lang^="zh"] .oslachat { font-family: var(--font-zh, inherit); }

/* phones: launcher above the call bar, panel full screen */
@media (max-width: 767.98px) {
  .oslachat-btn { right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); height: 48px; padding: 0 16px 0 13px; font-size: 15px; }
  body.site .back-to-top-link { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .oslachat-panel { inset: 0; width: auto; height: auto; height: 100dvh; border-radius: 0; }
  html.oslachat-lock, html.oslachat-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .oslachat.is-open .oslachat-panel, .oslachat-typing i { animation: none; }
}
@media print { .oslachat { display: none !important; } }
