/* GSWAI Site Assistant widget */
.gswai-assistant-root {
  position: fixed;
  z-index: 99980;
  bottom: 1.25rem;
  right: 1.25rem;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.gswai-assistant-root.gswai-assistant--left {
  right: auto;
  left: 1.25rem;
}

.gswai-assistant-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--gswai-accent, #2563eb);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gswai-assistant-fab:hover {
  transform: scale(1.05);
}

.gswai-assistant-fab-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.gswai-assistant-panel {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: min(100vw - 2rem, 380px);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: #0a1220;
  color: #e8eef7;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.gswai-assistant-root.gswai-assistant--left .gswai-assistant-panel {
  right: auto;
  left: 0;
}

.gswai-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gswai-assistant-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.gswai-assistant-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.gswai-assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  min-height: 180px;
  max-height: 320px;
}

.gswai-assistant-msg {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  max-width: 95%;
  word-break: break-word;
  white-space: pre-wrap;
}

.gswai-assistant-msg--user {
  margin-left: auto;
  background: rgba(37, 99, 235, 0.35);
}

.gswai-assistant-msg--assistant,
.gswai-assistant-msg--agent {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.06);
  white-space: normal;
}

.gswai-assistant-msg--assistant strong,
.gswai-assistant-msg--agent strong {
  font-weight: 600;
  color: #fff;
}

.gswai-assistant-msg--assistant em,
.gswai-assistant-msg--agent em {
  font-style: italic;
  opacity: 0.95;
}

.gswai-assistant-msg--agent {
  border-left: 3px solid #34d399;
}

.gswai-assistant-cached {
  font-size: 0.75rem;
  opacity: 0.55;
}

.gswai-assistant-actions {
  padding: 0 1rem 0.5rem;
}

.gswai-assistant-live {
  width: 100%;
  padding: 0.45rem;
  font-size: 0.8125rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #a5b4fc;
  cursor: pointer;
}

.gswai-assistant-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  align-items: flex-end;
}

.gswai-assistant-form textarea {
  flex: 1;
  resize: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  padding: 0.5rem 0.65rem;
  font: inherit;
}

.gswai-assistant-send {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: var(--gswai-accent, #2563eb);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.gswai-assistant-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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