/* Support chat widget; every rule is scoped to .lsc so the shop styles stay untouched. */
.lsc {
  --lsc-accent: #3f6b2f;
  --lsc-accent-text: #ffffff;
  --lsc-surface: #ffffff;
  --lsc-text: #222222;
  --lsc-muted: #666666;
  --lsc-user: #eef3ea;
  --lsc-border: #d8ddd4;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1050;
  font-size: 15px;
  line-height: 1.45;
  color: var(--lsc-text);
}

.lsc button { font: inherit; cursor: pointer; }

.lsc-toggle {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--lsc-accent);
  color: var(--lsc-accent-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.lsc-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  display: flex;
  flex-direction: column;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 96px);
  background: var(--lsc-surface);
  border: 1px solid var(--lsc-border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.lsc-panel[hidden] { display: none; }

.lsc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--lsc-accent);
  color: var(--lsc-accent-text);
}

.lsc-title { flex: 1; font-weight: 600; }

.lsc-reset, .lsc-close {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 2px 6px;
}

.lsc-reset { font-size: 13px; text-decoration: underline; }
.lsc-close { font-size: 22px; line-height: 1; }

.lsc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsc-message {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 10px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.lsc-message p, .lsc-message ul { margin: 0 0 6px; white-space: normal; }
.lsc-message p:last-child, .lsc-message ul:last-child { margin-bottom: 0; }
.lsc-message ul { padding-left: 18px; }
.lsc-message a { color: var(--lsc-accent); text-decoration: underline; }

.lsc-user { align-self: flex-end; background: var(--lsc-user); }
.lsc-assistant { align-self: flex-start; background: #f6f6f4; }
.lsc-waiting { display: flex; gap: 5px; padding: 13px 14px; }

.lsc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lsc-muted);
  animation: lsc-bounce 1.2s infinite ease-in-out;
}

.lsc-dot:nth-child(3) { animation-delay: 0.15s; }
.lsc-dot:nth-child(4) { animation-delay: 0.3s; }

@keyframes lsc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lsc-dot { animation: none; opacity: 0.6; }
}
.lsc-error { background: #fbeceb; color: #8a1f17; }

.lsc-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 4px;
  border-top: 1px solid var(--lsc-border);
}

.lsc-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--lsc-border);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
}

.lsc-send {
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--lsc-accent);
  color: var(--lsc-accent-text);
}

.lsc-send:disabled { opacity: 0.6; cursor: wait; }

.lsc-note { margin: 0; padding: 4px 12px 10px; font-size: 12px; color: var(--lsc-muted); }

.lsc-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 480px) {
  .lsc-panel { height: calc(100vh - 96px); }
}
