/* LujuriaCR AI RAG Chat Widget Styles */

#lujuria-rag-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999998;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Floating Launcher Pill */
.lujuria-rag-btn-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--lujuria-launcher-bg, linear-gradient(135deg, #1a1617 0%, #2b1c20 100%));
  color: #ffffff !important;
  border: 1px solid var(--lujuria-primary, #701f31);
  padding: 12px 20px;
  border-radius: 35px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lujuria-rag-btn-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.35);
  border-color: #c41e3a;
}

/* Notification Badge (inviting to continue conversation) */
.lujuria-rag-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #e63946 0%, #c41e3a 100%);
  color: #ffffff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 10px rgba(196, 30, 58, 0.65);
  animation: lujuriaBadgePulse 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
  z-index: 10;
}

@keyframes lujuriaBadgePulse {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 9px rgba(230, 57, 70, 0); }
  100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.lujuria-rag-btn-launcher.lujuria-rag-has-notification {
  border-color: #c41e3a;
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.4);
  animation: lujuriaLauncherGaze 4s infinite ease-in-out;
}

@keyframes lujuriaLauncherGaze {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.lujuria-rag-icon-sparkle {
  color: #f1c40f;
  font-size: 16px;
  animation: lujuriaSparkleTwinkle 2.5s infinite ease-in-out;
}

@keyframes lujuriaSparkleTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.2) rotate(12deg); opacity: 1; }
}

.lujuria-rag-icon-chat {
  font-size: 15px;
}

/* Chat Window Box */
.lujuria-rag-chat-box {
  width: 380px;
  max-width: calc(100vw - 24px);
  height: 580px;
  max-height: calc(100vh - 80px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #edd4d8;
  transform-origin: bottom right;
}

.lujuria-rag-chat-box.lujuria-rag-opening {
  animation: lujuriaRagPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lujuria-rag-chat-box.lujuria-rag-closing {
  animation: lujuriaRagPopOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lujuriaRagPopIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lujuriaRagPopOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(16px) scale(0.95); }
}

/* Responsive Desktop Dimensions: taller and spacious */
@media (min-width: 768px) {
  .lujuria-rag-chat-box {
    width: 410px;
    height: 670px;
    max-height: calc(100vh - 70px);
  }
}

@media (min-width: 1280px) {
  .lujuria-rag-chat-box {
    width: 425px;
    height: 700px;
    max-height: calc(100vh - 65px);
  }
}

@media (max-width: 480px) {
  #lujuria-rag-widget {
    bottom: 12px;
    right: 12px;
  }
  .lujuria-rag-chat-box {
    width: calc(100vw - 24px);
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    border-radius: 16px;
  }
}

@keyframes lujuriaRagSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.lujuria-rag-header {
  background: var(--lujuria-header-bg, #1a1617);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--lujuria-primary, #870020);
  position: relative;
  background-size: cover;
  background-position: center;
}

.lujuria-rag-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lujuria-rag-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.lujuria-rag-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: block;
}

.lujuria-rag-status-dot-avatar {
  position: absolute;
  bottom: -1px;
  right: -1px;
  border: 2px solid var(--lujuria-header-bg, #1a1617);
  width: 10px;
  height: 10px;
}

.lujuria-rag-header-info strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.lujuria-rag-subtitle {
  display: block;
  font-size: 11px;
  color: #d1b8bd;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.lujuria-rag-status-dot {
  width: 9px;
  height: 9px;
  background-color: #2ecc71;
  border-radius: 50%;
  box-shadow: 0 0 8px #2ecc71;
}

.lujuria-rag-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lujuria-rag-reset-btn {
  background: transparent;
  border: none;
  color: #d1b8bd;
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.75;
  transition: all 0.2s ease;
  padding: 4px;
}

.lujuria-rag-reset-btn:hover {
  opacity: 1;
  transform: rotate(90deg);
  color: #ffffff;
}

.lujuria-rag-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 2px;
}

.lujuria-rag-close-btn:hover {
  opacity: 1;
}

/* Messages Area */
.lujuria-rag-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #fdfafb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lujuria-rag-msg {
  display: flex;
  max-width: 85%;
  animation: lujuriaMsgSlideIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lujuriaMsgSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.lujuria-rag-msg-user {
  align-self: flex-end;
}

.lujuria-rag-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  transition: box-shadow 0.2s ease;
}

.lujuria-rag-msg-bot .lujuria-rag-bubble {
  background: #ffffff;
  color: #222222;
  border: 1px solid #ebd9dc;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.lujuria-rag-msg-user .lujuria-rag-bubble {
  background: var(--lujuria-user-bubble, #c41e3a);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* Typing Indicator Animation */
.lujuria-rag-bubble-typing {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: #666666 !important;
  font-style: normal !important;
  font-size: 12px;
}

.lujuria-rag-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lujuria-rag-typing-dots .lujuria-dot {
  width: 5px;
  height: 5px;
  background-color: var(--lujuria-primary, #870020);
  border-radius: 50%;
  display: inline-block;
  animation: lujuriaTypingBounce 1.4s infinite ease-in-out both;
}

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

@keyframes lujuriaTypingBounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.35; }
  40% { transform: scale(1.15); opacity: 1; }
}

/* Quick Suggestion Pills */
.lujuria-rag-pills-bar {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  overflow-x: auto;
  white-space: nowrap;
  border-top: 1px solid #f0e6e8;
  scrollbar-width: none;
}

.lujuria-rag-pills-bar::-webkit-scrollbar {
  display: none;
}

.lujuria-rag-pill {
  background: #fff0f3;
  color: var(--lujuria-primary, #870020);
  border: 1px solid #f8ccd5;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lujuria-rag-pill:hover {
  background: var(--lujuria-user-bubble, #c41e3a);
  color: #ffffff;
  border-color: var(--lujuria-user-bubble, #c41e3a);
}

/* Footer & Form */
.lujuria-rag-footer-form {
  display: flex;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #edd4d8;
  gap: 8px;
}

.lujuria-rag-footer-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #dcdcdc;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
}

.lujuria-rag-footer-form input:focus {
  border-color: var(--lujuria-primary, #c41e3a);
}

.lujuria-rag-footer-form button {
  background: var(--lujuria-user-bubble, #c41e3a);
  color: #ffffff;
  border: none;
  padding: 0 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.lujuria-rag-footer-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lujuria-rag-disclaimer {
  font-size: 10px;
  color: #888888;
  text-align: center;
  padding: 4px 14px 8px 14px;
  background: #ffffff;
}

.lujuria-rag-disclaimer a {
  color: #c41e3a;
  text-decoration: none;
  font-weight: 600;
}

/* Interactive Product Cards inside Chat */
.lujuria-rag-products-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 2px;
}

.lujuria-rag-product-card {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #ebd0d5;
  border-radius: 12px;
  padding: 8px 12px;
  gap: 12px;
  text-decoration: none !important;
  color: #1a1617 !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.lujuria-rag-product-card:hover {
  border-color: #870020;
  box-shadow: 0 6px 18px rgba(135,0,32,0.13);
  transform: translateY(-2px);
  background: #fffafa;
}

.lujuria-rag-product-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #fbf7f8;
  flex-shrink: 0;
  border: 1px solid #f0e6e8;
  transition: transform 0.3s ease;
}

.lujuria-rag-product-card:hover .lujuria-rag-product-img {
  transform: scale(1.08);
}

.lujuria-rag-product-info {
  flex: 1;
  min-width: 0;
}

.lujuria-rag-product-title {
  font-size: 12px;
  font-weight: 600;
  color: #1a1617;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.lujuria-rag-product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lujuria-rag-product-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #870020;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.lujuria-rag-product-size {
  font-size: 10px;
  font-weight: 600;
  background: #fdf2f4;
  color: #870020;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #fad2d9;
}

.lujuria-rag-product-arrow {
  color: #870020;
  font-size: 16px;
  font-weight: bold;
  padding-left: 4px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lujuria-rag-product-card:hover .lujuria-rag-product-arrow {
  transform: translateX(4px);
}

/* Category Collection CTA Button */
.lujuria-rag-collection-cta {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #870020 0%, #a61234 100%);
  color: #ffffff !important;
  text-align: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 3px 8px rgba(135, 0, 32, 0.25);
  transition: all 0.2s ease;
}

.lujuria-rag-collection-cta:hover {
  background: linear-gradient(135deg, #6b0019 0%, #870020 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(135, 0, 32, 0.35);
  color: #ffffff !important;
}

/* Action Chips (Size & follow-up selector) */
.lujuria-rag-action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.lujuria-rag-chip-btn {
  background: #ffffff;
  color: #870020;
  border: 1px solid #e8bcc5;
  padding: 5px 11px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.lujuria-rag-chip-btn:hover {
  background: #870020;
  color: #ffffff;
  border-color: #870020;
  transform: translateY(-1px);
}

/* Guided Grid in Welcome Message */
.lujuria-rag-welcome-prompt {
  margin-top: 10px;
  font-weight: 700;
  color: #1a1617;
  font-size: 12px;
}

.lujuria-rag-guided-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.lujuria-rag-guided-btn {
  background: #fff8f9;
  border: 1px solid #ebd0d5;
  color: #870020;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.lujuria-rag-guided-btn:hover {
  background: #870020;
  color: #ffffff;
  border-color: #870020;
  transform: translateY(-1px);
}

