#oa-livechat {
  --oa-ink: #132028;
  --oa-sea: #0f6b5c;
  --oa-sea-dark: #0a4f44;
  --oa-paper: #f3f7f6;
  --oa-line: #d5e3df;
  --oa-muted: #5a6f78;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  font-family: Figtree, system-ui, sans-serif;
  color: var(--oa-ink);
}

.oa-lc-launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  background: var(--oa-sea);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 107, 92, 0.28);
}
.oa-lc-launcher:hover,
.oa-lc-launcher:focus-visible { background: var(--oa-sea-dark); }
.oa-lc-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #d9a21b;
  color: #132028;
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
  padding: 0 0.3rem;
}

.oa-lc-panel {
  position: absolute;
  right: 0;
  bottom: 3.6rem;
  width: min(22.5rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 7rem));
  background: #fff;
  border: 1px solid var(--oa-line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(19, 32, 40, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.oa-lc-panel[hidden] { display: none; }

.oa-lc-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: var(--oa-sea);
  color: #fff;
}
.oa-lc-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.oa-lc-head h2 { margin: 0.1rem 0 0; font-size: 1.15rem; }
.oa-lc-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}

.oa-lc-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
  min-height: 0;
  flex: 1;
  background: var(--oa-paper);
}
.oa-lc-intro,
.oa-lc-error { margin: 0; font-size: 0.92rem; }
.oa-lc-error { color: #9b2c2c; }
.oa-lc-intro { color: var(--oa-muted); }

.oa-lc-gate,
.oa-lc-compose { display: flex; flex-direction: column; gap: 0.5rem; }
.oa-lc-gate input,
.oa-lc-gate textarea,
.oa-lc-compose textarea {
  width: 100%;
  border: 1px solid var(--oa-line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--oa-ink);
  background: #fff;
}
.oa-lc-send {
  border: 0;
  border-radius: 8px;
  background: var(--oa-sea);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
}
.oa-lc-send:disabled { opacity: 0.6; cursor: wait; }

.oa-lc-thread {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow: auto;
  flex: 1;
  min-height: 8rem;
}
.oa-lc-msg {
  max-width: 85%;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border: 1px solid var(--oa-line);
}
.oa-lc-msg p { margin: 0; }
.oa-lc-msg-who { font-size: 0.75rem; font-weight: 700; color: var(--oa-muted); }
.oa-lc-msg-body { white-space: pre-wrap; word-break: break-word; }
.oa-lc-msg-time { font-size: 0.72rem; color: var(--oa-muted); margin-top: 0.25rem; }
.oa-lc-msg-visitor { align-self: flex-end; background: #e7f4f0; }
.oa-lc-msg-staff { align-self: flex-start; }
.oa-lc-msg-system { align-self: center; max-width: 100%; background: transparent; border: 0; color: var(--oa-muted); text-align: center; }

.oa-lc-typing {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--oa-muted);
  font-size: 0.82rem;
}
.oa-lc-typing[hidden] { display: none; }
.oa-lc-tools { display: flex; gap: 0.4rem; }
.oa-lc-tool {
  flex: 1;
  border: 1px solid var(--oa-line);
  background: #fff;
  color: var(--oa-sea);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
}
.oa-lc-tool:disabled { opacity: 0.6; cursor: wait; }
.oa-lc-transcript {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 0;
  flex: 1;
}
.oa-lc-transcript pre {
  margin: 0;
  flex: 1;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 0.85rem;
  background: #fff;
  border: 1px solid var(--oa-line);
  border-radius: 8px;
  padding: 0.75rem;
}
.oa-lc-closed-wrap { display: flex; flex-direction: column; gap: 0.55rem; }
.oa-lc-dots { display: inline-flex; gap: 0.18rem; }
.oa-lc-dots i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  animation: oa-lc-dot 1s infinite ease-in-out;
}
.oa-lc-dots i:nth-child(2) { animation-delay: 0.15s; }
.oa-lc-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes oa-lc-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
