:root {
  --lc-brand: #39ff14;
  --lc-brand-dark: #20e84b;
  --lc-accent: #ffd35a;
  --lc-ink: #f7fff9;
  --lc-muted: #c8ffd9;
  --lc-border: rgba(57, 255, 20, 0.34);
  --lc-panel: #050705;
  --lc-panel-2: #0d120e;
  --lc-soft: #090d0a;
  --lc-agent: #132018;
  --lc-customer: #39ff14;
  --lc-shadow: 0 18px 56px rgba(0, 0, 0, 0.48), 0 0 28px rgba(57, 255, 20, 0.18);
}

.lc-widget,
.lc-widget * {
  box-sizing: border-box;
}

.lc-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--lc-ink);
}

.lc-launcher {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 211, 90, 0.82);
  border-radius: 999px;
  background: #020403;
  color: var(--lc-brand);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(57, 255, 20, 0.12), 0 12px 28px rgba(0, 0, 0, 0.42), 0 0 22px rgba(57, 255, 20, 0.35);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.lc-launcher:hover,
.lc-launcher:focus-visible {
  border-color: var(--lc-brand);
  box-shadow: 0 0 0 5px rgba(255, 211, 90, 0.14), 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 28px rgba(255, 211, 90, 0.42);
  transform: translateY(-2px);
}

.lc-launcher svg,
.lc-icon-button svg,
.lc-send svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.lc-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 112px));
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--lc-border);
  border-radius: 8px;
  background: var(--lc-panel);
  box-shadow: var(--lc-shadow);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.lc-widget[data-open="true"] .lc-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lc-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--lc-border);
  background: linear-gradient(135deg, #020403 0%, #0c180f 52%, #19220d 100%);
  color: var(--lc-ink);
}

.lc-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 211, 90, 0.8);
  background: var(--lc-accent);
  color: #050705;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(255, 211, 90, 0.32);
}

.lc-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
}

.lc-status {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 4px;
  color: var(--lc-muted);
  font-size: 12px;
  font-weight: 700;
}

.lc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lc-brand);
  box-shadow: 0 0 9px rgba(57, 255, 20, 0.88);
}

.lc-icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(57, 255, 20, 0.32);
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.08);
  color: var(--lc-brand);
  cursor: pointer;
}

.lc-new-chat {
  min-height: 34px;
  border: 1px solid rgba(255, 211, 90, 0.62);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 211, 90, 0.12);
  color: var(--lc-accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.lc-new-chat:hover,
.lc-new-chat:focus-visible {
  background: rgba(57, 255, 20, 0.16);
  border-color: var(--lc-brand);
  color: var(--lc-brand);
}

.lc-icon-button:hover,
.lc-icon-button:focus-visible {
  background: rgba(255, 211, 90, 0.16);
  color: var(--lc-accent);
}

.lc-intake,
.lc-chat {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.lc-intake {
  gap: 14px;
  padding: 18px;
  background: var(--lc-panel);
}

.lc-intake p {
  margin: 0;
  color: #e9fff0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
}

.lc-field {
  display: grid;
  gap: 7px;
}

.lc-label {
  font-size: 13px;
  font-weight: 900;
  color: var(--lc-accent);
  text-transform: uppercase;
}

.lc-input,
.lc-textarea {
  width: 100%;
  border: 1px solid var(--lc-border);
  border-radius: 8px;
  background: #0b100c;
  color: var(--lc-ink);
  font: inherit;
  font-size: 14px;
  outline: 0;
  transition: border 140ms ease, box-shadow 140ms ease;
}

.lc-input {
  min-height: 42px;
  padding: 0 12px;
}

.lc-textarea {
  min-height: 86px;
  resize: vertical;
  padding: 11px 12px;
}

.lc-input:focus,
.lc-textarea:focus {
  border-color: var(--lc-brand);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.16), 0 0 12px rgba(57, 255, 20, 0.18);
}

.lc-start,
.lc-send {
  border: 0;
  background: var(--lc-brand);
  color: #020403;
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.28);
}

.lc-start {
  min-height: 44px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0;
}

.lc-start:hover,
.lc-start:focus-visible,
.lc-send:hover,
.lc-send:focus-visible {
  background: var(--lc-brand-dark);
  color: #020403;
}

.lc-chat {
  display: none;
  background: radial-gradient(circle at top left, rgba(57, 255, 20, 0.12), transparent 32%), var(--lc-soft);
}

.lc-widget[data-started="true"] .lc-intake {
  display: none;
}

.lc-widget[data-started="true"] .lc-chat {
  display: flex;
}

.lc-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.lc-message {
  display: flex;
  margin-bottom: 12px;
}

.lc-message-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.lc-message[data-author="agent"] {
  justify-content: flex-start;
}

.lc-message[data-author="agent"] .lc-message-bubble {
  background: var(--lc-agent);
  color: var(--lc-ink);
  border: 1px solid rgba(57, 255, 20, 0.24);
}

.lc-message[data-author="customer"] {
  justify-content: flex-end;
}

.lc-message[data-author="customer"] .lc-message-bubble {
  background: var(--lc-customer);
  color: #020403;
  font-weight: 700;
}

.lc-meta {
  display: block;
  margin-top: 5px;
  color: inherit;
  opacity: 0.7;
  font-size: 11px;
}

.lc-typing {
  min-height: 24px;
  padding: 0 16px 8px;
  color: var(--lc-accent);
  font-size: 12px;
  font-weight: 700;
}

.lc-composer {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--lc-border);
  background: var(--lc-panel-2);
}

.lc-composer .lc-input {
  min-height: 44px;
}

.lc-send {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.lc-powered {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(57, 255, 20, 0.18);
  background: #050705;
  color: var(--lc-muted);
  font-size: 11px;
  text-align: center;
}

.lc-powered a {
  color: var(--lc-accent);
  font-weight: 900;
}

.lc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .lc-widget {
    right: 12px;
    bottom: 12px;
  }

  .lc-panel {
    right: -4px;
    bottom: 70px;
    width: calc(100vw - 24px);
    height: min(640px, calc(100vh - 96px));
  }

  .lc-header {
    grid-template-columns: auto 1fr auto;
  }

  .lc-new-chat {
    grid-column: 2 / 4;
    justify-self: start;
  }
}
