/* variables.css - Variáveis CSS personalizáveis */
:root {
  --sendout-primary-color: #0080FF;
  --sendout-primary-gradient: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  --sendout-secondary-color: #F97316;
  --sendout-accent-color: #FF7A33;
  --sendout-success-color: #28a745;
  --sendout-error-color: #dc3545;
  --sendout-warning-color: #ffc107;
  --sendout-info-color: #17a2b8;

  --sendout-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sendout-font-size-base: 14px;
  --sendout-line-height-base: 1.5;

  --sendout-border-radius: 16px;
  --sendout-border-radius-sm: 8px;
  --sendout-border-radius-lg: 20px;

  --sendout-shadow: 0 8px 32px rgba(0, 128, 255, 0.15);
  --sendout-shadow-sm: 0 4px 16px rgba(0, 128, 255, 0.1);
  --sendout-shadow-lg: 0 16px 48px rgba(0, 128, 255, 0.2);

  --sendout-spacing-xs: 4px;
  --sendout-spacing-sm: 8px;
  --sendout-spacing-md: 16px;
  --sendout-spacing-lg: 24px;
  --sendout-spacing-xl: 32px;

  --sendout-transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --sendout-transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sendout-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Cores de fundo */
  --sendout-bg-white: #ffffff;
  --sendout-bg-light: #f8f9fa;
  --sendout-bg-dark: #343a40;

  /* Cores de texto */
  --sendout-text-primary: #212529;
  --sendout-text-secondary: #6c757d;
  --sendout-text-muted: #adb5bd;
  --sendout-text-white: #ffffff;

  /* Bordas */
  --sendout-border-color: #dee2e6;
  --sendout-border-color-light: #e9ecef;

  /* Estados */
  --sendout-hover-opacity: 0.8;
  --sendout-active-scale: 0.98;
  --sendout-disabled-opacity: 0.6;
}
/* widget.css - Estilos do Widget */
.sendout-chat-icon {
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  position: relative;
  z-index: 9999;
}

.sendout-chat-icon:hover {
  transform: scale(1.05);
  box-shadow: 0 16px 48px rgba(0, 128, 255, 0.2);
}

.sendout-chat-icon:active {
  transform: scale(0.98);
}

.sendout-icon-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  opacity: 0.3;
  animation: sendout-pulse 2s infinite;
  z-index: -1;
}

@keyframes sendout-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.3;
  }
}

.sendout-icon-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sendout-icon-open {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #5b21b6 100%);
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 15px 30px rgba(90, 41, 182, 0.35);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.sendout-icon-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(90, 41, 182, 0.45);
}

.sendout-icon-open:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(90, 41, 182, 0.35);
}

.sendout-icon-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #5b21b6 100%);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 10px 25px rgba(90, 41, 182, 0.35);
}

.sendout-icon-spark {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sendout-icon-label {
  color: white;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.sendout-icon-text {
  color: white;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.sendout-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #F97316;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Chat Dropdown Styles */
.sendout-chat-dropdown {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  height: 100vh;
  background: #ffffff;
  border-radius: 12px 0 0 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10002; /* Above overlay and trigger button */
  transform-origin: center right;
}

/* Right-to-left animations */
.slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-out-right {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.sendout-chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4); /* 40% black, no blur */
  z-index: 10001; /* Between page and drawer; above trigger button (9999) */
  display: block;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.sendout-chat-modal {
  background: var(--sendout-bg-white);
  border-radius: var(--sendout-border-radius);
  box-shadow: var(--sendout-shadow-lg);
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  animation: sendout-modal-appear 0.3s ease-out;
}

@keyframes sendout-modal-appear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsividade */
@media (max-width: 480px) {
  .sendout-chat-modal {
    width: 95%;
    max-height: 90vh;
    margin: var(--sendout-spacing-sm);
  }
  
  .sendout-chat-icon {
    width: 220px;
    height: 56px;
  }
  
  .sendout-chat-form {
    padding: var(--sendout-spacing-md);
  }
  
  .sendout-messages-container {
    padding: var(--sendout-spacing-sm);
  }
  
  .sendout-input-container {
    padding: var(--sendout-spacing-sm);
  }
  
  .sendout-message {
    max-width: 90%;
  }
  
  .sendout-avatar-icon {
    width: 64px;
    height: 64px;
  }
  
  .sendout-form-header h3 {
    font-size: 20px;
  }
  
  .sendout-icon-text {
    font-size: 12px;
  }
  
  .sendout-chat-dropdown {
    width: 100vw;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    border-radius: 0;
  }
}
/* sendout.css - Estilos principais do SDK */

/* Form Styles */
.sendout-chat-form {
  padding: var(--sendout-spacing-lg);
}

.sendout-form-header {
  text-align: center;
  margin-bottom: var(--sendout-spacing-lg);
}

.sendout-form-header h3 {
  margin: 0 0 var(--sendout-spacing-sm) 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--sendout-text-primary);
}

.sendout-form-header p {
  margin: 0;
  font-size: var(--sendout-font-size-base);
  color: var(--sendout-text-secondary);
}

.sendout-ai-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sendout-spacing-sm);
  margin-bottom: var(--sendout-spacing-md);
}

.sendout-avatar-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 128, 255, 0.15);
}

.sendout-avatar-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
}

.sendout-avatar-status {
  display: flex;
  align-items: center;
  gap: var(--sendout-spacing-xs);
  font-size: 12px;
  color: var(--sendout-success-color);
  font-weight: 500;
}

.sendout-status-dot {
  width: 8px;
  height: 8px;
  background: var(--sendout-success-color);
  border-radius: 50%;
}

.sendout-form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--sendout-spacing-md);
}

.sendout-form-group {
  display: flex;
  flex-direction: column;
}

.sendout-form-group label {
  margin-bottom: var(--sendout-spacing-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--sendout-text-primary);
}

.sendout-form-group input {
  padding: var(--sendout-spacing-md);
  border: 2px solid var(--sendout-border-color);
  border-radius: var(--sendout-border-radius);
  font-size: var(--sendout-font-size-base);
  font-family: var(--sendout-font-family);
  transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--sendout-bg-white);
}

.sendout-form-group input:focus {
  outline: none;
  border-color: var(--sendout-primary-color);
  box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
}

.sendout-submit-btn {
  padding: var(--sendout-spacing-md);
  background: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  color: var(--sendout-text-white);
  border: none;
  border-radius: var(--sendout-border-radius);
  font-size: var(--sendout-font-size-base);
  font-weight: 500;
  cursor: pointer;
  transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: var(--sendout-spacing-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sendout-spacing-sm);
  box-shadow: 0 4px 16px rgba(0, 128, 255, 0.1);
}

.sendout-submit-btn:hover {
  opacity: 0.8;
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 128, 255, 0.15);
}

.sendout-submit-btn:active {
  transform: scale(0.98);
}

.sendout-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Chat Window Styles */
.sendout-chat-window {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sendout-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sendout-spacing-md) var(--sendout-spacing-lg);
  border-bottom: 1px solid var(--sendout-border-color-light);
  background: var(--sendout-bg-white);
  flex-shrink: 0;
}

.sendout-header-info {
  display: flex;
  align-items: center;
  gap: var(--sendout-spacing-sm);
}

.sendout-ai-avatar-small {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sendout-tome-avatar {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
}

.sendout-header-text {
  display: flex;
  flex-direction: column;
}

.sendout-header-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--sendout-text-primary);
}

.sendout-header-status {
  font-size: 12px;
  color: var(--sendout-success-color);
  font-weight: 500;
}

.sendout-header-actions {
  display: flex;
  gap: var(--sendout-spacing-xs);
}

.sendout-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sendout-text-secondary);
  padding: var(--sendout-spacing-xs);
  border-radius: var(--sendout-border-radius-sm);
  transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sendout-action-btn:hover {
  background-color: var(--sendout-bg-light);
  color: var(--sendout-text-primary);
}

.sendout-messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--sendout-spacing-md);
  background-color: var(--sendout-bg-light);
  scrollbar-width: thin;
  scrollbar-color: var(--sendout-primary-color) transparent;
}

.sendout-messages-container::-webkit-scrollbar {
  width: 6px;
}

.sendout-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.sendout-messages-container::-webkit-scrollbar-thumb {
  background: var(--sendout-primary-color);
  border-radius: 3px;
}

.sendout-messages-container::-webkit-scrollbar-thumb:hover {
  background: var(--sendout-secondary-color);
}

.sendout-messages {
  display: flex;
  flex-direction: column;
  gap: var(--sendout-spacing-sm);
}

.sendout-message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: sendout-message-appear 0.3s ease-out;
}

.sendout-message-user {
  align-self: flex-end;
  align-items: flex-end;
}

.sendout-message-bot {
  align-self: flex-start;
  align-items: flex-start;
  flex-direction: row;
}

.sendout-message-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--sendout-spacing-sm);
  flex-shrink: 0;
}

.sendout-message-avatar-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
}

.sendout-message-content {
  padding: var(--sendout-spacing-sm) var(--sendout-spacing-md);
  border-radius: var(--sendout-border-radius);
  word-wrap: break-word;
  white-space: pre-wrap;
  font-size: var(--sendout-font-size-base);
  line-height: var(--sendout-line-height-base);
}

.sendout-message-user .sendout-message-content {
  background-color: var(--sendout-primary-color);
  color: var(--sendout-text-white);
}

.sendout-message-bot .sendout-message-content {
  background-color: var(--sendout-bg-white);
  color: var(--sendout-text-primary);
  border: 1px solid var(--sendout-border-color-light);
  box-shadow: 0 4px 16px rgba(0, 128, 255, 0.1);
}

.sendout-message-time {
  font-size: 11px;
  color: var(--sendout-text-muted);
  margin-top: 4px;
  padding: 0 var(--sendout-spacing-sm);
}

.sendout-message-user .sendout-message-time {
  text-align: right;
}

@keyframes sendout-message-appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sendout-input-container {
  border-top: 1px solid var(--sendout-border-color-light);
  background-color: var(--sendout-bg-white);
  padding: var(--sendout-spacing-md);
  flex-shrink: 0;
}

.sendout-typing-indicator {
  display: flex;
  align-items: center;
  gap: var(--sendout-spacing-sm);
  padding: var(--sendout-spacing-sm) var(--sendout-spacing-md);
  margin-bottom: var(--sendout-spacing-sm);
  background: var(--sendout-bg-light);
  border-radius: var(--sendout-border-radius);
  border: 1px solid var(--sendout-border-color-light);
}

.sendout-typing-avatar {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #0080FF 0%, #1AA3FF 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.sendout-typing-avatar-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
}

.sendout-typing-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sendout-typing-text span {
  font-size: 12px;
  color: var(--sendout-text-secondary);
  font-weight: 500;
}

.sendout-typing-dots {
  display: flex;
  gap: 2px;
}

.sendout-typing-dots span {
  width: 4px;
  height: 4px;
  background: var(--sendout-primary-color);
  border-radius: 50%;
  animation: sendout-typing-dot 1.4s infinite;
}

.sendout-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.sendout-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sendout-typing-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.sendout-input-form {
  display: flex;
  gap: var(--sendout-spacing-sm);
  align-items: flex-end;
}

.sendout-input-form input {
  flex: 1;
  padding: var(--sendout-spacing-md);
  border: 2px solid var(--sendout-border-color);
  border-radius: var(--sendout-border-radius);
  font-size: var(--sendout-font-size-base);
  font-family: var(--sendout-font-family);
  resize: none;
  transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--sendout-bg-white);
}

.sendout-input-form input:focus {
  outline: none;
  border-color: var(--sendout-primary-color);
  box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
}

.sendout-input-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sendout-input-form button {
  padding: var(--sendout-spacing-md);
  background-color: var(--sendout-primary-color);
  color: var(--sendout-text-white);
  border: none;
  border-radius: var(--sendout-border-radius);
  cursor: pointer;
  transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 16px rgba(0, 128, 255, 0.1);
}

.sendout-input-form button:hover:not(:disabled) {
  background-color: var(--sendout-primary-color);
  opacity: 0.8;
  transform: scale(1.05);
}

.sendout-input-form button:active:not(:disabled) {
  transform: scale(0.98);
}

.sendout-input-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error Styles */
.sendout-error {
  color: var(--sendout-error-color);
  font-size: 14px;
  margin-top: var(--sendout-spacing-sm);
  text-align: center;
  animation: sendout-error-appear 0.3s ease-out;
}

@keyframes sendout-error-appear {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .sendout-chat-window {
    height: 100vh;
    max-height: 100vh;
  }

  .sendout-chat-form {
    padding: var(--sendout-spacing-md);
  }

  .sendout-messages-container {
    padding: var(--sendout-spacing-sm);
  }

  .sendout-input-container {
    padding: var(--sendout-spacing-sm);
  }

  .sendout-message {
    max-width: 90%;
  }

  .sendout-avatar-icon {
    width: 64px;
    height: 64px;
  }

  .sendout-form-header h3 {
    font-size: 20px;
  }

  .sendout-icon-text {
    font-size: 12px;
  }
}
