.lc-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle bubble */
.lc-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1a365d;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.2s;
  position: relative;
}
.lc-toggle:hover {
  background: #2c5282;
  transform: scale(1.05);
}
.lc-toggle svg { pointer-events: none; }
.lc-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Panel */
.lc-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-height: 560px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.lc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1a365d;
  color: #fff;
  flex-shrink: 0;
}
.lc-header-title {
  font-weight: 600;
  font-size: 1rem;
}
.lc-header-sub {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 2px;
}
.lc-close {
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.lc-close:hover { color: #fff; }

/* Messages area */
.lc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 240px;
  max-height: 380px;
  background: #f7fafc;
}

.lc-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: lc-fade-in 0.2s ease;
}
@keyframes lc-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.lc-msg-them { align-self: flex-start; align-items: flex-start; }
.lc-msg-me { align-self: flex-end; align-items: flex-end; }
.lc-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}
.lc-msg-me .lc-msg-bubble {
  background: #1a365d;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.lc-msg-them .lc-msg-bubble {
  background: #fff;
  color: #2d3748;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 4px;
}
.lc-msg-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #718096;
  margin-bottom: 2px;
  padding: 0 4px;
}
.lc-msg-time {
  font-size: 0.7rem;
  color: #a0aec0;
  margin-top: 2px;
  padding: 0 4px;
}

/* Typing indicator */
.lc-typing {
  align-self: flex-start;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.lc-typing-dot {
  width: 7px;
  height: 7px;
  background: #a0aec0;
  border-radius: 50%;
  animation: lc-bounce 1.4s infinite;
}
.lc-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.lc-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes lc-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Live mode banner */
.lc-live-banner {
  padding: 6px 16px;
  background: #c6f6d5;
  color: #276749;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

/* Input bar */
.lc-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.lc-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #cbd5e0;
  border-radius: 24px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.lc-input:focus { border-color: #4299e1; }
.lc-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a365d;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.lc-send:hover { background: #2c5282; }
.lc-send:disabled { background: #cbd5e0; cursor: default; }

/* Powered-by */
.lc-powered {
  text-align: center;
  padding: 6px;
  font-size: 0.65rem;
  color: #a0aec0;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.lc-powered a { color: #718096; text-decoration: none; }
.lc-powered a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 480px) {
  .lc-panel {
    width: calc(100vw - 32px);
    right: -8px;
    bottom: 72px;
    max-height: 75vh;
  }
}
