/* VIXO AI Official Custom Front-End Widget CSS */
:root {
  --vixo-dark-obsidian: #0b1120;
  --vixo-card-bg: #151e32;
  --vixo-crimson-glow: #ef4444;
  --vixo-crimson-dark: #dc2626;
  --vixo-green-wa: #25D366;
  --vixo-text-light: #f8fafc;
  --vixo-text-subtle: #94a3b8;
  --vixo-border-slate: #2a374e;
  --vixo-glass: rgba(15, 23, 42, 0.85);
  --vixo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#vixo-ai-widget-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: var(--vixo-font-family);
}

.vixo-launcher-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  position: relative;
}

.vixo-launcher-btn:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.6);
}

.vixo-launcher-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.vixo-pulse-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 2px solid #0b1120;
  border-radius: 50%;
  animation: vixo-pulse 2s infinite;
}

@keyframes vixo-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.vixo-chat-window {
  width: 410px;
  height: 640px;
  max-height: calc(100vh - 90px);
  background: var(--vixo-dark-obsidian);
  border: 1px solid var(--vixo-border-slate);
  border-radius: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  bottom: 80px;
  right: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  pointer-events: none;
}

.vixo-chat-window.vixo-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.vixo-chat-header {
  background: var(--vixo-glass);
  backdrop-filter: blur(12px);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--vixo-border-slate);
}

.vixo-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vixo-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--vixo-crimson-glow);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.vixo-header-brand {
  font-weight: 800;
  font-size: 15px;
  color: var(--vixo-text-light);
  letter-spacing: 0.3px;
}

.vixo-header-tag {
  font-size: 11px;
  color: #22c55e;
  font-weight: 600;
}

.vixo-close-x {
  background: transparent;
  border: none;
  color: var(--vixo-text-subtle);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.vixo-close-x:hover { color: #fff; }

.vixo-account-bar {
  background: #111827;
  padding: 6px 16px;
  border-bottom: 1px solid var(--vixo-border-slate);
  font-size: 11.5px;
}

.vixo-customer-badge {
  color: #22c55e;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vixo-customer-badge.vixo-not-logged {
  color: var(--vixo-text-subtle);
}

.vixo-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vixo-msg {
  display: flex;
  gap: 10px;
  max-width: 90%;
}

.vixo-msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.vixo-msg-bot {
  align-self: flex-start;
}

.vixo-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--vixo-border-slate);
}

.vixo-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--vixo-text-light);
}

.vixo-msg-user .vixo-msg-bubble {
  background: linear-gradient(135deg, var(--vixo-crimson-glow), #b91c1c);
  border-bottom-right-radius: 3px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}

.vixo-msg-bot .vixo-msg-bubble {
  background: var(--vixo-card-bg);
  border: 1px solid var(--vixo-border-slate);
  border-bottom-left-radius: 3px;
}

.vixo-btn-agent-topic {
  background: #1e293b;
  border: 1px solid var(--vixo-border-slate);
  color: var(--vixo-text-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.vixo-btn-agent-topic:hover {
  background: var(--vixo-crimson-glow);
  color: #fff;
  border-color: var(--vixo-crimson-glow);
}

.vixo-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--vixo-border-slate);
}

.vixo-pill-item {
  background: var(--vixo-card-bg);
  border: 1px solid var(--vixo-border-slate);
  color: var(--vixo-text-subtle);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.vixo-pill-item:hover {
  background: var(--vixo-crimson-glow);
  color: #fff;
  border-color: var(--vixo-crimson-glow);
}

.vixo-ocr-card {
  background: var(--vixo-card-bg);
  border: 1px solid var(--vixo-crimson-glow);
  border-radius: 14px;
  padding: 12px;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.vixo-ocr-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.vixo-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: vixo-scan 2s infinite linear;
}

@keyframes vixo-scan {
  0% { top: 10px; }
  50% { top: 110px; }
  100% { top: 10px; }
}

.vixo-product-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.vixo-product-card {
  background: rgba(21, 30, 50, 0.95);
  border: 1px solid var(--vixo-border-slate);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.vixo-product-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--vixo-border-slate);
}

.vixo-product-info {
  flex: 1;
}

.vixo-product-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--vixo-text-light);
  margin-bottom: 2px;
}

.vixo-product-sku {
  font-size: 11px;
  color: var(--vixo-text-subtle);
  margin-bottom: 4px;
}

.vixo-product-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--vixo-crimson-glow);
}

.vixo-badge-stock {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
}

.vixo-in-stock { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.vixo-out-stock { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.vixo-product-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.vixo-btn-add-cart {
  background: #1e293b;
  border: 1px solid var(--vixo-border-slate);
  color: var(--vixo-text-light);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.vixo-btn-add-cart:hover { background: #334155; }

.vixo-btn-buy-direct {
  background: linear-gradient(135deg, var(--vixo-crimson-glow), #dc2626);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.vixo-btn-buy-direct:hover { background: #b91c1c; color: #fff; }

.vixo-wa-card {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid var(--vixo-green-wa);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  text-align: center;
}

.vixo-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--vixo-green-wa);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 800;
  font-size: 12.5px;
  margin-top: 6px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.vixo-input-bar {
  padding: 12px 14px;
  background: var(--vixo-glass);
  border-top: 1px solid var(--vixo-border-slate);
  display: flex;
  align-items: center;
  gap: 8px;
}

.vixo-btn-photo {
  background: transparent;
  border: none;
  color: var(--vixo-text-subtle);
  cursor: pointer;
  padding: 6px;
  font-size: 18px;
  border-radius: 50%;
  transition: color 0.2s;
}

.vixo-btn-photo:hover { color: var(--vixo-crimson-glow); }

.vixo-text-input {
  flex: 1;
  background: var(--vixo-dark-obsidian);
  border: 1px solid var(--vixo-border-slate);
  color: var(--vixo-text-light);
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
}

.vixo-text-input:focus { border-color: var(--vixo-crimson-glow); }

.vixo-btn-send {
  background: var(--vixo-crimson-glow);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vixo-btn-send:hover { background: var(--vixo-crimson-dark); }

.vixo-footer-credit {
  background: #090e1a;
  padding: 4px 12px;
  text-align: center;
  font-size: 10px;
  color: #64748b;
  border-top: 1px solid rgba(255,255,255,0.05);
}
