.aiwsc-floating-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  background: #16a34a;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

.aiwsc-floating-button.is-hidden {
  display: none;
}

.aiwsc-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  width: min(360px, calc(100vw - 24px));
  max-height: min(640px, calc(100vh - 40px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
}

.aiwsc-chat-panel.is-open {
  display: flex;
}

.aiwsc-chat-header {
  padding: 18px 20px 14px;
  background: #0f172a;
  color: #ffffff;
  position: relative;
}

.aiwsc-chat-title {
  font-size: 16px;
  font-weight: 700;
}

.aiwsc-chat-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.aiwsc-chat-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.aiwsc-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.aiwsc-chat-row {
  display: flex;
  margin-bottom: 10px;
}

.aiwsc-chat-row-user {
  justify-content: flex-end;
}

.aiwsc-chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.aiwsc-chat-row-user .aiwsc-chat-bubble {
  background: #4f46e5;
  color: #ffffff;
}

.aiwsc-chat-form {
  border-top: 1px solid #e2e8f0;
  padding: 14px;
  background: #ffffff;
}

.aiwsc-chat-lead-fields {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.aiwsc-chat-lead-hint {
  margin-bottom: 10px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.aiwsc-chat-lead-error {
  display: none;
  margin-bottom: 10px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}

.aiwsc-chat-lead-status {
  display: none;
  margin-bottom: 10px;
  color: #166534;
  font-size: 13px;
  line-height: 1.5;
}

.aiwsc-chat-contact-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 10px 12px;
  font: inherit;
  color: #0f172a;
  background: #ffffff;
}

.aiwsc-chat-contact-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.aiwsc-chat-input {
  width: 100%;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 10px 12px;
  font: inherit;
}

.aiwsc-chat-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.aiwsc-chat-submit,
.aiwsc-chat-whatsapp-fallback {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.aiwsc-chat-submit {
  background: #4f46e5;
  color: #ffffff;
}

.aiwsc-chat-whatsapp-fallback {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.aiwsc-chat-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aiwsc-product-button,
.aiwsc-cart-button {
  margin-top: 12px;
  display: inline-block;
}
