/* CloseNexa stylesheet — original, editable source.
 * Copyright (c) CloseNexa. SPDX-License-Identifier: GPL-2.0-or-later
 * No compilation, minification or third-party runtime library; see SOURCES.txt.
 */
/* Keep theme box sizing and viewport scrollbars from clipping the embedded chat. */
.aiwsc-chat-panel,
.aiwsc-chat-panel * {
  box-sizing: border-box;
}

.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(100% - 40px));
  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;
  padding-inline-end: 64px;
  flex-shrink: 0;
  background: #0f172a;
  color: #ffffff;
  position: relative;
}

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

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

.aiwsc-chat-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.aiwsc-chat-messages {
  flex: 1;
  min-height: 0;
  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;
}

.aiwsc-branding {
  display: block;
  padding: 8px 16px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  text-decoration: none;
}
html[dir="rtl"] .aiwsc-chat-panel {
  direction: rtl;
}
@media (max-width: 480px) {
  .aiwsc-chat-panel {
    max-width: calc(100% - 40px);
    max-height: calc(100dvh - 32px);
  }
}
.aiwsc-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
}
.aiwsc-product-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 260px;
  margin-top: 10px;
}
.aiwsc-product-image {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
}
.aiwsc-product-add {
  padding: 10px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.aiwsc-product-action-status {
  font-size: 12px;
}
.aiwsc-floating-button[hidden],
#aiwsc-widget-root[hidden] {
  display: none !important;
}

.aiwsc-chat-row-assistant {
  flex-direction: column;
  align-items: flex-start;
}
.aiwsc-product-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.aiwsc-product-card select {
  max-width: 100%;
}

.aiwsc-product-regular {
  font-size: 0.85em;
  color: #64748b;
  text-decoration: line-through;
}
.aiwsc-product-sale {
  font-weight: 700;
}

.aiwsc-chat-panel :is(button, a, input, textarea, select):focus-visible {
  outline: 3px solid #818cf8;
  outline-offset: 2px;
}

.aiwsc-chat-next-message {
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #6757ff;
  border-radius: 10px;
  background: #fff;
  color: #5140dc;
  font: inherit;
  line-height: 1.35;
  text-align: start;
  white-space: normal;
  cursor: pointer;
}
.aiwsc-chat-next-message:focus-visible {
  outline: 2px solid #6757ff;
  outline-offset: 2px;
}
