:root {
  --psc2-primary: #0f172a;
  --psc2-accent: #7c3aed;
  --psc2-bg: #ffffff;
  --psc2-surface: #f8fafc;
  --psc2-border: rgba(15, 23, 42, 0.12);
  --psc2-muted: #64748b;
}

.psc2-chatbot {
  font-family: Inter, Arial, sans-serif;
}

.psc2-window {
  width: 100%;
  max-width: 430px;
  background: var(--psc2-bg);
  border: 1px solid var(--psc2-border);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.psc2-inline .psc2-window {
  max-width: 100%;
}

.psc2-floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
}

.psc2-floating .psc2-window {
  margin-top: 10px;
}

.psc2-header {
  padding: 18px 20px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--psc2-primary), var(--psc2-accent));
}

.psc2-subtitle {
  opacity: 0.88;
  font-size: 12px;
  margin-top: 4px;
}

.psc2-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.psc2-toggle {
  border: 0;
  border-radius: 18px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--psc2-primary), var(--psc2-accent));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.2);
}

.psc2-toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

.psc2-messages {
  height: 390px;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, var(--psc2-surface) 100%);
}

.psc2-message {
  display: flex;
  margin-bottom: 12px;
}

.psc2-message-user {
  justify-content: flex-end;
}

.psc2-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--psc2-border);
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: 14px;
}

.psc2-message-user .psc2-bubble {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--psc2-primary), var(--psc2-accent));
}

.psc2-sources {
  margin-top: 6px;
  padding: 0 8px;
  font-size: 12px;
}

.psc2-sources ul {
  margin: 8px 0 0 18px;
}

.psc2-sources a {
  color: var(--psc2-accent);
  text-decoration: none;
}

.psc2-suggestions {
  padding: 12px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
}

.psc2-suggestion {
  border: 1px solid var(--psc2-border);
  background: #fff;
  color: var(--psc2-primary);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
}

.psc2-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--psc2-border);
  background: #fff;
}

.psc2-form input {
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--psc2-border);
  padding: 0 14px;
  font-size: 14px;
}

.psc2-form button,
.psc2-cta {
  border: 0;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--psc2-primary), var(--psc2-accent));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.psc2-footer {
  background: #fff;
  padding: 0 16px 16px;
}

.psc2-privacy {
  color: var(--psc2-muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.psc2-cta-wrap {
  display: flex;
}

.psc2-typing .psc2-bubble {
  color: var(--psc2-muted);
}

@media (max-width: 640px) {
  .psc2-floating {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .psc2-floating .psc2-window,
  .psc2-window {
    max-width: 100%;
  }

  .psc2-toggle {
    width: 100%;
    justify-content: center;
  }
}
