.aiwos-agent-widget {
  --aiwos-agent-color: #2563eb;
  font-family: inherit;
  color: #111827;
  box-sizing: border-box;
}
.aiwos-agent-widget * {
  box-sizing: border-box;
}
.aiwos-agent-panel {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}
.aiwos-agent-mode-embedded .aiwos-agent-panel {
  width: 100%;
  max-width: 720px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
}
.aiwos-agent-mode-floating {
  position: fixed;
  z-index: 2147483000;
  bottom: 24px;
}
.aiwos-agent-mode-launcher {
  position: relative;
  display: inline-block;
  z-index: 2147483000;
}
.aiwos-agent-mode-floating.aiwos-agent-bottom-right {
  right: 24px;
}
.aiwos-agent-mode-floating.aiwos-agent-bottom-left {
  left: 24px;
}
.aiwos-agent-mode-floating .aiwos-agent-panel {
  position: absolute;
  bottom: 64px;
  max-height: min(680px, calc(100vh - 110px));
  z-index: 2147483001;
}
.aiwos-agent-mode-launcher .aiwos-agent-panel {
  position: absolute;
  top: calc(100% + 10px);
  max-height: min(680px, calc(100vh - 110px));
}
.aiwos-agent-bottom-right .aiwos-agent-panel {
  right: 0;
}
.aiwos-agent-bottom-left .aiwos-agent-panel {
  left: 0;
}
.aiwos-agent-launcher {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--aiwos-agent-color);
  color: #fff;
  font: inherit;
  font-weight: 750;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.25);
  cursor: pointer;
}
.aiwos-agent-launcher > span:first-child {
  font-size: 20px;
}
.aiwos-agent-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--aiwos-agent-color), #111827);
  color: #fff;
}
.aiwos-agent-header strong {
  font-size: 17px;
}
.aiwos-agent-header p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.45;
}
.aiwos-agent-close {
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.aiwos-agent-messages {
  height: 310px;
  max-height: 40vh;
  overflow: auto;
  padding: 18px;
  background: #f8fafc;
}
.aiwos-agent-message {
  display: flex;
  margin: 0 0 12px;
}
.aiwos-agent-message > div {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 15px;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
}
.aiwos-agent-message-agent > div {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 5px;
}
.aiwos-agent-message-visitor {
  justify-content: flex-end;
}
.aiwos-agent-message-visitor > div {
  background: var(--aiwos-agent-color);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.aiwos-agent-prompts {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding: 10px 16px 0;
}
.aiwos-agent-prompts button {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.aiwos-agent-question {
  display: flex;
  gap: 8px;
  padding: 13px 16px;
}
.aiwos-agent-question textarea {
  flex: 1;
  min-height: 46px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  font: inherit;
}
.aiwos-agent-question button,
.aiwos-agent-action,
.aiwos-agent-lead button {
  border: 0;
  border-radius: 12px;
  background: var(--aiwos-agent-color);
  color: #fff;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.aiwos-agent-actions {
  padding: 0 16px;
}
.aiwos-agent-actions:empty {
  display: none;
}
.aiwos-agent-recommendations {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.aiwos-agent-product {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.aiwos-agent-product p {
  margin: 4px 0 0;
}
.aiwos-agent-sources {
  margin: 10px 0;
  font-size: 12px;
}
.aiwos-agent-sources ul {
  margin: 7px 0 0;
  padding-left: 18px;
}
.aiwos-agent-action {
  display: inline-block;
  margin: 8px 6px 6px 0;
}
.aiwos-agent-reset {
  display: block;
  margin: 0 16px 10px;
  border: 0;
  background: transparent;
  color: #64748b;
  text-decoration: underline;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.aiwos-agent-lead {
  margin: 0 16px 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13px;
}
.aiwos-agent-lead summary {
  cursor: pointer;
  font-weight: 700;
}
.aiwos-agent-lead form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.aiwos-agent-lead input,
.aiwos-agent-lead textarea {
  width: 100%;
  padding: 9px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font: inherit;
}
.aiwos-agent-lead label {
  font-size: 12px;
}
.aiwos-agent-lead label input {
  width: auto;
}
.aiwos-agent-privacy {
  padding: 9px 16px;
  border-top: 1px solid #eef2f7;
  color: #64748b;
  font-size: 10px;
  line-height: 1.4;
}
.aiwos-agent-widget.is-working .aiwos-agent-message-agent:last-child > div {
  animation: aiwos-agent-pulse 1.1s infinite alternate;
}
@keyframes aiwos-agent-pulse {
  to {
    opacity: 0.55;
  }
}
@media (max-width: 600px) {
  .aiwos-agent-mode-floating {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .aiwos-agent-mode-floating .aiwos-agent-panel,
  .aiwos-agent-mode-launcher .aiwos-agent-panel {
    position: fixed;
    inset: 12px;
    width: auto;
    max-height: none;
  }
  .aiwos-agent-messages {
    height: calc(100vh - 310px);
    max-height: none;
  }
  .aiwos-agent-launcher {
    margin-left: auto;
  }
  .aiwos-agent-bottom-left .aiwos-agent-launcher {
    margin-left: 0;
    margin-right: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aiwos-agent-widget * {
    scroll-behavior: auto !important;
    animation: none !important;
  }
}
