#lsc-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#lsc-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #111827, #1f2937);
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#lsc-chat-toggle .lsc-icon svg {
  width: 34px;
  height: 34px;
  fill: #facc15;
}

#lsc-chat-toggle .lsc-icon circle {
  fill: #111827;
}

#lsc-chat-toggle .lsc-icon path {
  fill: #facc15;
}

#lsc-chat-window {
  position: fixed;
  bottom: 95px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  background: #0b1120;
  color: #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15,23,42,.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}

#lsc-chat-window.lsc-hidden {
  display: none;
}

#lsc-chat-window .lsc-header {
  padding: 12px 14px;
  background: radial-gradient(circle at top left, #1d4ed8, transparent 55%), #020617;
  border-bottom: 1px solid rgba(148,163,184,.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lsc-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lsc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(15,23,42,.9);
  border: 1px solid rgba(249,250,251,.3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
}

.lsc-name {
  font-size: 15px;
  font-weight: 700;
}

.lsc-sub {
  font-size: 11px;
  color: #9ca3af;
}

.lsc-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.lsc-close:hover {
  color: #f9fafb;
}

.lsc-body {
  flex: 1;
  padding: 10px 12px;
  background:
    radial-gradient(circle at top, rgba(37,99,235,.35), transparent 60%),
    radial-gradient(circle at bottom, rgba(234,179,8,.1), transparent 60%),
    #020617;
  overflow-y: auto;
}

.lsc-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lsc-msg {
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 92%;
  white-space: pre-line;
}

.lsc-msg-user {
  align-self: flex-end;
  background: #1f2937;
  color: #ffffff !important; /* نص المستخدم أبيض */
  border-bottom-right-radius: 2px;
}

.lsc-msg-bot {
  align-self: flex-start;
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(148,163,184,.5);
  border-bottom-left-radius: 2px;
}

.lsc-msg-bot strong {
  color: #facc15;
}

.lsc-footer {
  border-top: 1px solid rgba(148,163,184,.4);
  padding: 8px;
  background: #020617;
}

.lsc-form {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.lsc-input {
  flex: 1;
  resize: none;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.6);
  padding: 8px 9px;
  font-size: 13px;
  background: rgba(15,23,42,.7);
  color: #ffffff !important; /* كتابة في حقل الإدخال بيضاء */
  max-height: 80px;
}

.lsc-input:focus {
  outline: none;
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgba(250,204,21,.7);
}

.lsc-send {
  padding: 7px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.lsc-send:disabled {
  opacity: .7;
  cursor: default;
}

.lsc-send:hover:not(:disabled) {
  filter: brightness(1.05);
}

@media (max-width: 480px) {
  #lsc-chat-window {
    right: 10px;
    bottom: 80px;
    width: calc(100vw - 20px);
  }

  #lsc-chat-toggle {
    right: 10px;
    bottom: 15px;
  }
}
