/**
 * SmartShop AI - Modern ChatGPT Widget
 * Author: Rafael Pastor
 *
 * Colors use CSS custom properties set via --chatgptbot-primary
 * from the admin configuration panel.
 */

/* Widget principal */
#chatgptbot-widget {
  position: fixed !important;
  bottom: 20px !important;
  z-index: 999999 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
}

/* Position variants */
#chatgptbot-widget.chatgptbot-bottom-right {
  right: 20px !important;
  left: auto !important;
  top: auto !important;
}

#chatgptbot-widget.chatgptbot-bottom-left {
  left: 20px !important;
  right: auto !important;
  top: auto !important;
}

/* Botón flotante */
#chatgptbot-toggle {
  width: 60px;
  height: 60px;
  background: var(--chatgptbot-primary, #667eea);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

#chatgptbot-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

#chatgptbot-toggle:active {
  transform: translateY(0) scale(0.95);
}

/* Efecto de pulso para el botón */
#chatgptbot-toggle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0);
  transition: transform 0.3s ease;
}

#chatgptbot-toggle:hover::before {
  transform: scale(1);
}

/* Caja del chat */
#chatgptbot-box {
  position: absolute;
  bottom: 75px;
  width: 380px;
  height: 520px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Chat box position based on widget position */
.chatgptbot-bottom-right #chatgptbot-box {
  right: 0;
  transform-origin: bottom right;
}

.chatgptbot-bottom-left #chatgptbot-box {
  left: 0;
  transform-origin: bottom left;
}

#chatgptbot-box.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(20px);
}

#chatgptbot-box:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

/* Header del chat */
#chatgptbot-header {
  background: var(--chatgptbot-primary, #667eea);
  color: white;
  padding: 20px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.chatgptbot-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatgptbot-new-chat-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.chatgptbot-new-chat-btn svg {
  color: white;
  transition: transform 0.2s ease;
}

/* Asegurar que el botón esté visible - FORZADO */
#chatgptbot-new-chat {
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 8px !important;
  padding: 8px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: block !important;
  width: 32px !important;
  height: 32px !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 9999 !important;
  flex-shrink: 0 !important;
}

#chatgptbot-new-chat:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Tooltip personalizado para el botón */
#chatgptbot-new-chat {
  position: relative;
}

#chatgptbot-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.8s ease;
}

/* Área de mensajes */
#chatgptbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
  scroll-behavior: smooth;
}

#chatgptbot-messages::-webkit-scrollbar {
  width: 6px;
}

#chatgptbot-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#chatgptbot-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

#chatgptbot-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Estilos de mensajes */
.chatgptbot-message {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.chatgptbot-message.bot {
  align-items: flex-start;
}

.chatgptbot-message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.chatgptbot-message.user .chatgptbot-message-content {
  background: var(--chatgptbot-primary, #667eea);
  color: white;
  border-bottom-right-radius: 6px;
}

.chatgptbot-message.bot .chatgptbot-message-content {
  background: white;
  color: #333;
  border: 1px solid #e9ecef;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chatgptbot-message-time {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  padding: 0 4px;
}

/* WhatsApp button */
#chatgptbot-whatsapp-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: #25D366;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  flex-shrink: 0;
}

#chatgptbot-whatsapp-btn:hover {
  background: #1ebe57;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

#chatgptbot-whatsapp-btn:active {
  transform: scale(0.95);
}

/* Escalation area */
#chatgptbot-escalation-area {
  text-align: center;
  padding: 6px 20px 10px;
  background: white;
}

#chatgptbot-escalate-link {
  font-size: 12px;
  color: #999;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

#chatgptbot-escalate-link:hover {
  color: var(--chatgptbot-primary, #667eea);
  text-decoration: underline;
}

#chatgptbot-escalation-form {
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  animation: messageSlideIn 0.3s ease-out;
}

#chatgptbot-escalation-form input[type="email"],
#chatgptbot-escalation-form input[type="text"] {
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 8px;
  outline: none;
  box-sizing: border-box;
}

#chatgptbot-escalation-form .chatgptbot-escalation-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#chatgptbot-escalation-form button {
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
}

#chatgptbot-escalation-form .chatgptbot-escalation-submit {
  background: var(--chatgptbot-primary, #667eea);
  color: white;
}

#chatgptbot-escalation-form .chatgptbot-escalation-cancel {
  background: #e9ecef;
  color: #666;
}

/* Quick replies */
.chatgptbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 12px;
}

.chatgptbot-quick-reply-btn {
  background: white;
  border: 1px solid var(--chatgptbot-primary, #667eea);
  color: var(--chatgptbot-primary, #667eea);
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chatgptbot-quick-reply-btn:hover {
  background: var(--chatgptbot-primary, #667eea);
  color: white;
}

/* Área de input */
#chatgptbot-input-area {
  padding: 20px;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 12px;
  align-items: center;
}

#chatgptbot-input {
  flex: 1;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  padding: 12px 20px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

#chatgptbot-input:focus {
  border-color: var(--chatgptbot-primary, #667eea);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

#chatgptbot-input::placeholder {
  color: #adb5bd;
}

#chatgptbot-send {
  width: 44px;
  height: 44px;
  background: var(--chatgptbot-primary, #667eea);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 16px;
}

#chatgptbot-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

#chatgptbot-send:active {
  transform: scale(0.95);
}

#chatgptbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Indicador de escritura */
.chatgptbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  max-width: 80%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chatgptbot-typing-dots {
  display: flex;
  gap: 4px;
}

.chatgptbot-typing-dot {
  width: 8px;
  height: 8px;
  background: var(--chatgptbot-primary, #667eea);
  border-radius: 50%;
  animation: typingDot 1.4s infinite ease-in-out;
}

.chatgptbot-typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.chatgptbot-typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}
.chatgptbot-typing-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typingDot {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Tarjetas de productos */
.chatgptbot-products-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 100%;
  margin-top: 8px;
}

.chatgptbot-product-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.chatgptbot-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--chatgptbot-primary, #667eea);
}

.chatgptbot-product-card .product-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.chatgptbot-product-card .product-info {
  flex: 1;
  min-width: 0;
}

.chatgptbot-product-card .product-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatgptbot-product-card .product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--chatgptbot-primary, #667eea);
  margin: 0 0 2px 0;
}

.chatgptbot-product-card .product-category {
  font-size: 11px;
  color: #666;
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatgptbot-product-card .product-button {
  background: var(--chatgptbot-primary, #667eea);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatgptbot-product-card .product-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chatgptbot-product-card .product-button:hover {
  transform: scale(1.05);
}

.chatgptbot-product-card .product-addtocart {
  background: transparent;
  color: var(--chatgptbot-primary, #667eea);
  border: 1.5px solid var(--chatgptbot-primary, #667eea);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatgptbot-product-card .product-addtocart:hover {
  background: var(--chatgptbot-primary, #667eea);
  color: white;
  transform: scale(1.05);
}

.chatgptbot-product-card .product-addtocart:disabled {
  cursor: default;
  opacity: 0.8;
  transform: none;
}

.chatgptbot-product-card .product-addtocart--added {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

/* Animación de pulso para el botón toggle */
@keyframes pulse {
  0% {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }
}

/* Enlaces de categorías */
.chatgptbot-message-content .category-link {
  color: var(--chatgptbot-primary, #667eea);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted var(--chatgptbot-primary, #667eea);
  transition: all 0.2s ease;
  padding: 1px 2px;
  border-radius: 3px;
}

.chatgptbot-message-content .category-link:hover {
  background-color: var(--chatgptbot-primary, #667eea);
  color: white;
  border-bottom: 1px solid var(--chatgptbot-primary, #667eea);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatgptbot-message-content .category-link:active {
  transform: translateY(0);
}

/* Order tracking card */
.chatgptbot-order-card {
  background: white;
  border: 1px solid #e9ecef;
  border-left: 4px solid var(--chatgptbot-primary, #667eea);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  max-width: 100%;
  animation: messageSlideIn 0.3s ease-out;
}

.chatgptbot-order-card .order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}

.chatgptbot-order-card .order-reference {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.chatgptbot-order-card .order-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.chatgptbot-order-card .status-default { background: #e9ecef; color: #495057; }
.chatgptbot-order-card .status-delivered { background: #d4edda; color: #155724; }
.chatgptbot-order-card .status-shipped { background: #cce5ff; color: #004085; }
.chatgptbot-order-card .status-processing { background: #fff3cd; color: #856404; }
.chatgptbot-order-card .status-cancelled { background: #f8d7da; color: #721c24; }

.chatgptbot-order-card .order-details { padding: 10px 14px; }

.chatgptbot-order-card .order-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 13px;
  color: #555;
}

.chatgptbot-order-card .order-label { font-weight: 600; color: #666; font-size: 12px; }
.chatgptbot-order-card .order-total { font-weight: 700; color: var(--chatgptbot-primary, #667eea); font-size: 14px; }

.chatgptbot-order-card .order-tracking-link {
  color: var(--chatgptbot-primary, #667eea);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px dotted var(--chatgptbot-primary, #667eea);
  transition: all 0.2s ease;
}

.chatgptbot-order-card .order-tracking-link:hover { color: #764ba2; border-bottom-color: #764ba2; }

.chatgptbot-order-card .order-products { padding: 10px 14px; border-top: 1px solid #f0f0f0; }
.chatgptbot-order-card .order-products-list { list-style: none; margin: 6px 0 0 0; padding: 0; }

.chatgptbot-order-card .order-product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  color: #555;
  border-bottom: 1px solid #f8f8f8;
}

.chatgptbot-order-card .order-product-item:last-child { border-bottom: none; }
.chatgptbot-order-card .order-product-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; font-size: 12px; color: #333; }
.chatgptbot-order-card .order-product-details { white-space: nowrap; font-weight: 600; color: #666; font-size: 12px; }

/* Lead Capture Modal */
#chatgptbot-lead-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 12px 12px;
}

.chatgptbot-lead-form {
  padding: 24px;
  text-align: center;
  width: 100%;
  max-width: 300px;
}

.chatgptbot-lead-form h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.chatgptbot-lead-form p {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: #666;
}

.chatgptbot-lead-field {
  margin-bottom: 10px;
}

.chatgptbot-lead-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.chatgptbot-lead-field input:focus {
  outline: none;
  border-color: var(--chatgptbot-primary, #667eea);
}

.chatgptbot-lead-error {
  color: #e74c3c;
  font-size: 12px;
  margin-bottom: 10px;
  text-align: left;
}

#chatgptbot-lead-submit {
  width: 100%;
  padding: 10px;
  background: var(--chatgptbot-primary, #667eea);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

#chatgptbot-lead-submit:hover { opacity: 0.9; }
#chatgptbot-lead-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.chatgptbot-lead-skip-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: transparent;
  color: #999;
  border: none;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.chatgptbot-lead-skip-btn:hover { color: #666; }

/* Product comparison */
.chatgptbot-comparison-wrapper {
  overflow-x: auto;
  margin: 8px 0;
  animation: messageSlideIn 0.3s ease-out;
}

.chatgptbot-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 300px;
}

.chatgptbot-comparison-table th,
.chatgptbot-comparison-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.chatgptbot-comparison-table th {
  background: #f8f9fa;
  font-weight: 600;
  font-size: 11px;
}

.chatgptbot-comparison-table img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 4px;
}

.chatgptbot-comparison-table .comparison-name {
  font-weight: 600;
  font-size: 11px;
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatgptbot-comparison-table .comparison-price {
  font-weight: 700;
  color: var(--chatgptbot-primary, #667eea);
}

.chatgptbot-comparison-table .comparison-desc {
  font-size: 11px;
  color: #666;
  max-width: 120px;
}

.chatgptbot-compare-btn {
  display: block;
  margin: 8px auto;
  padding: 6px 16px;
  border: 1px solid var(--chatgptbot-primary, #667eea);
  background: transparent;
  color: var(--chatgptbot-primary, #667eea);
  border-radius: 16px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.chatgptbot-compare-btn:hover {
  background: var(--chatgptbot-primary, #667eea);
  color: #fff;
}

.chatgptbot-comparison-view-btn,
.chatgptbot-comparison-cart-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  margin: 2px;
  transition: opacity 0.2s;
}

.chatgptbot-comparison-view-btn {
  background: var(--chatgptbot-primary, #667eea);
  color: #fff;
}

.chatgptbot-comparison-cart-btn {
  background: #28a745;
  color: #fff;
}

.chatgptbot-comparison-view-btn:hover,
.chatgptbot-comparison-cart-btn:hover {
  opacity: 0.85;
}

/* Rating widget */
.chatgptbot-rating-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  margin: 8px 0 16px;
  animation: messageSlideIn 0.3s ease-out;
}

.chatgptbot-rating-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  text-align: center;
}

.chatgptbot-rating-buttons {
  display: flex;
  gap: 12px;
}

.chatgptbot-rating-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.chatgptbot-rating-btn:hover {
  border-color: var(--chatgptbot-primary, #667eea);
  background: var(--chatgptbot-primary, #667eea);
  transform: scale(1.15);
}

.chatgptbot-rating-btn:active {
  transform: scale(0.95);
}

.chatgptbot-rating-thanks {
  font-size: 13px;
  color: var(--chatgptbot-primary, #667eea);
  font-weight: 500;
  text-align: center;
  padding: 8px 0;
  animation: messageSlideIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  #chatgptbot-widget {
    bottom: 15px;
  }

  #chatgptbot-widget.chatgptbot-bottom-right {
    right: 15px;
  }

  #chatgptbot-widget.chatgptbot-bottom-left {
    left: 15px;
  }

  #chatgptbot-box {
    width: 320px;
    height: 480px;
    bottom: 70px;
  }

  #chatgptbot-toggle {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }

  .chatgptbot-product-card .product-image {
    width: 50px;
    height: 50px;
  }

  .chatgptbot-product-card {
    padding: 10px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  #chatgptbot-box {
    width: calc(100vw - 30px);
    height: 450px;
  }

  .chatgptbot-bottom-right #chatgptbot-box {
    right: -5px;
  }

  .chatgptbot-bottom-left #chatgptbot-box {
    left: -5px;
  }

  .chatgptbot-products-cards {
    gap: 8px;
  }

  .chatgptbot-product-card .product-name {
    font-size: 12px;
  }

  .chatgptbot-product-card .product-price {
    font-size: 13px;
  }
}

/* Dark Mode */
#chatgptbot-widget.chatgptbot-dark #chatgptbot-box {
  background: #1a1a2e;
}

#chatgptbot-widget.chatgptbot-dark #chatgptbot-messages {
  background: #1a1a2e;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-message.bot {
  background: #2d2d44;
  color: #e0e0e0;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-message.user {
  color: #fff;
}

#chatgptbot-widget.chatgptbot-dark #chatgptbot-input {
  background: #2d2d44;
  color: #e0e0e0;
  border-color: #3d3d5c;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-header {
  border-bottom-color: #3d3d5c;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-input-area {
  background: #1a1a2e;
  border-top-color: #3d3d5c;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-product-card {
  background: #2d2d44;
  border-color: #3d3d5c;
  color: #e0e0e0;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-product-card .product-name {
  color: #e0e0e0;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-product-card .product-category {
  color: #999;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-quick-reply-btn {
  background: #2d2d44;
  color: #e0e0e0;
  border-color: #3d3d5c;
}

#chatgptbot-widget.chatgptbot-dark .chatgptbot-rating-container {
  background: #2d2d44;
  color: #e0e0e0;
}
