/* ============================================================
   AAROHI AI CHATBOT — Premium Bridal Widget
   Brand: Maroon (#5a1820) + Gold (#c9a96e) + Cream (#fdf9f2)
   ============================================================ */

:root {
  --aarohi-maroon: #5a1820;
  --aarohi-maroon-deep: #3d0f16;
  --aarohi-gold: #c9a96e;
  --aarohi-gold-light: #d4b277;
  --aarohi-gold-dark: #a8884a;
  --aarohi-cream: #fdf9f2;
  --aarohi-ink: #1f1f1f;
  --aarohi-mute: #6b6b6b;
  --aarohi-border: #ece6da;
  --aarohi-shadow-lg: 0 24px 60px rgba(90, 24, 32, 0.22), 0 0 0 1px rgba(0,0,0,0.04);
  --aarohi-shadow-md: 0 8px 24px rgba(90, 24, 32, 0.18);
}

/* ─────────────────────────────────────────
   TOGGLE BUTTON
─────────────────────────────────────────── */
.aarohi-chat-toggle {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--aarohi-maroon);
  border: 2.5px solid var(--aarohi-gold);
  cursor: pointer;
  z-index: 99998;
  padding: 0;
  box-shadow: var(--aarohi-shadow-md),
              0 0 0 4px rgba(201, 169, 110, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  /* No overflow:hidden — let chat badge + ring + tooltip extend outside.
     The logo <img> uses its own border-radius:50% to stay circular. */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  animation: aarohiPulse 2.6s ease-in-out infinite;
}
.aarohi-chat-toggle:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 16px 36px rgba(90, 24, 32, 0.32),
              0 0 0 6px rgba(201, 169, 110, 0.28);
}
.aarohi-chat-toggle:active { transform: translateY(-2px) scale(1.02); }
.aarohi-chat-toggle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.aarohi-chat-toggle .aarohi-toggle-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 169, 110, 0.35);
  pointer-events: none;
}
/* Chat bubble badge — sits at bottom-right of toggle, signals "I'm a chat" */
.aarohi-chat-toggle .aarohi-chat-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--aarohi-gold-light), var(--aarohi-gold));
  border: 2.5px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aarohi-maroon-deep);
  box-shadow: 0 3px 8px rgba(90, 24, 32, 0.28);
  animation: aarohiChatBadgePop 2.6s ease-in-out infinite;
  z-index: 2;
  overflow: hidden;
}
.aarohi-chat-toggle .aarohi-chat-badge svg {
  width: 18px;
  height: 18px;
  position: absolute;
  inset: 0;
  margin: auto;
  transform: translateY(-1px);
}
/* Typing dots that sit on top of the chat bubble shape */
.aarohi-chat-toggle .aarohi-chat-badge-dots {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -65%);
  display: flex;
  gap: 1.5px;
  z-index: 3;
}
.aarohi-chat-toggle .aarohi-chat-badge-dots i {
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: aarohiBadgeDot 1.2s ease-in-out infinite;
}
.aarohi-chat-toggle .aarohi-chat-badge-dots i:nth-child(2) { animation-delay: 0.15s; }
.aarohi-chat-toggle .aarohi-chat-badge-dots i:nth-child(3) { animation-delay: 0.30s; }
@keyframes aarohiBadgeDot {
  0%, 60%, 100% { opacity: 0.35; transform: scale(0.85); }
  30%           { opacity: 1;    transform: scale(1.15); }
}
@keyframes aarohiChatBadgePop {
  0%, 100% { transform: scale(1) rotate(0); }
  50%      { transform: scale(1.08) rotate(-3deg); }
}
.aarohi-chat-toggle.open .aarohi-chat-badge { display: none; }

/* Subtle scale for logo when hover, makes badge "pop forward" */
.aarohi-chat-toggle .aarohi-toggle-logo {
  transition: transform 0.3s ease;
}
.aarohi-chat-toggle:hover .aarohi-toggle-logo {
  transform: scale(0.92);
}
.aarohi-chat-toggle:hover .aarohi-chat-badge {
  transform: scale(1.15);
  animation: none;
}

@keyframes aarohiPulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(90, 24, 32, 0.22),
                0 0 0 4px rgba(201, 169, 110, 0.18),
                0 0 0 0 rgba(201, 169, 110, 0.45);
  }
  50% {
    box-shadow: 0 8px 24px rgba(90, 24, 32, 0.22),
                0 0 0 4px rgba(201, 169, 110, 0.18),
                0 0 0 18px rgba(201, 169, 110, 0);
  }
}

/* Tooltip on toggle */
.aarohi-chat-toggle .aarohi-toggle-tip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--aarohi-ink);
  color: #fff;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.aarohi-chat-toggle .aarohi-toggle-tip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--aarohi-ink);
}
.aarohi-chat-toggle:hover .aarohi-toggle-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(-2px);
}
.aarohi-chat-toggle.open .aarohi-toggle-tip { display: none; }

/* ─────────────────────────────────────────
   CHAT WINDOW
─────────────────────────────────────────── */
.aarohi-chat-window {
  position: fixed;
  bottom: 110px;
  right: 26px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 140px);
  background: var(--aarohi-cream);
  border-radius: 22px;
  box-shadow: var(--aarohi-shadow-lg);
  z-index: 99999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  transform-origin: bottom right;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.aarohi-chat-window.open {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─────────────────────────────────────────
   HEADER
─────────────────────────────────────────── */
.aarohi-chat-header {
  background: linear-gradient(135deg, var(--aarohi-maroon-deep) 0%, var(--aarohi-maroon) 100%);
  color: #fff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.aarohi-chat-header::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.18), transparent 70%);
  pointer-events: none;
}
.aarohi-chat-header-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--aarohi-gold);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--aarohi-maroon-deep);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
.aarohi-chat-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aarohi-chat-header-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.aarohi-chat-header-info .name {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.aarohi-chat-header-info .name span {
  color: var(--aarohi-gold);
  font-style: italic;
}
.aarohi-chat-header-info .status {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.aarohi-chat-header-info .status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #2ecc71;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
  animation: aarohiBlink 1.6s ease-in-out infinite;
}
@keyframes aarohiBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
.aarohi-chat-header-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  position: relative;
  z-index: 1;
}
.aarohi-chat-header-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg);
}

/* ─────────────────────────────────────────
   MESSAGES AREA
─────────────────────────────────────────── */
.aarohi-chat-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(201, 169, 110, 0.06), transparent 60%),
    var(--aarohi-cream);
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #d4c8b0 transparent;
}
.aarohi-chat-body::-webkit-scrollbar { width: 5px; }
.aarohi-chat-body::-webkit-scrollbar-track { background: transparent; }
.aarohi-chat-body::-webkit-scrollbar-thumb {
  background: #d4c8b0;
  border-radius: 4px;
}
.aarohi-chat-body::-webkit-scrollbar-thumb:hover { background: var(--aarohi-gold); }

.aarohi-msg {
  display: flex;
  margin-bottom: 14px;
  animation: aarohiMsgIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes aarohiMsgIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aarohi-msg.bot { justify-content: flex-start; }
.aarohi-msg.user { justify-content: flex-end; }

.aarohi-msg-bubble {
  max-width: 80%;
  padding: 11px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  word-wrap: break-word;
  white-space: pre-wrap;
  letter-spacing: 0.1px;
}
.aarohi-msg.bot .aarohi-msg-bubble {
  background: #fff;
  color: var(--aarohi-ink);
  border: 1px solid var(--aarohi-border);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 6px rgba(90, 24, 32, 0.04);
}
.aarohi-msg.user .aarohi-msg-bubble {
  background: linear-gradient(135deg, var(--aarohi-maroon) 0%, var(--aarohi-maroon-deep) 100%);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 10px rgba(90, 24, 32, 0.18);
}
.aarohi-msg-bubble strong, .aarohi-msg-bubble b {
  font-weight: 600;
  color: var(--aarohi-maroon);
}
.aarohi-msg.user .aarohi-msg-bubble strong,
.aarohi-msg.user .aarohi-msg-bubble b { color: var(--aarohi-gold-light); }
.aarohi-msg-bubble a {
  color: var(--aarohi-maroon);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--aarohi-gold);
  text-underline-offset: 3px;
}
.aarohi-msg.user .aarohi-msg-bubble a { color: var(--aarohi-gold-light); }

/* Welcome message bigger */
.aarohi-msg.welcome .aarohi-msg-bubble {
  background: linear-gradient(135deg, #fff 0%, #fdf6e9 100%);
  border-color: var(--aarohi-gold);
  font-size: 14.5px;
}

/* Typing indicator */
.aarohi-typing {
  display: inline-flex;
  gap: 5px;
  padding: 6px 0;
  align-items: center;
}
.aarohi-typing span {
  width: 8px;
  height: 8px;
  background: var(--aarohi-gold);
  border-radius: 50%;
  animation: aarohiTyping 1.3s infinite ease-in-out;
}
.aarohi-typing span:nth-child(2) { animation-delay: 0.15s; }
.aarohi-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes aarohiTyping {
  0%, 60%, 100% { transform: translateY(0) scale(0.85); opacity: 0.4; }
  30%           { transform: translateY(-6px) scale(1); opacity: 1; }
}

/* ─────────────────────────────────────────
   PRODUCT CARDS
─────────────────────────────────────────── */
.aarohi-products-wrap {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aarohi-product-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--aarohi-border);
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.aarohi-product-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--aarohi-gold);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}
.aarohi-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(90, 24, 32, 0.12);
  border-color: var(--aarohi-gold);
}
.aarohi-product-card:hover::before { transform: scaleY(1); }
.aarohi-product-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f5f0e6;
}
.aarohi-product-card .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.aarohi-product-card .name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--aarohi-ink);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.aarohi-product-card .price {
  font-size: 13.5px;
  color: var(--aarohi-maroon);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.aarohi-product-card .price del {
  color: var(--aarohi-mute);
  font-weight: 400;
  font-size: 11.5px;
}
.aarohi-product-card .view-arrow {
  align-self: center;
  color: var(--aarohi-gold);
  font-size: 18px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.aarohi-product-card:hover .view-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────────────────────────────────────
   QUICK REPLY CHIPS
─────────────────────────────────────────── */
.aarohi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.aarohi-chip {
  background: #fff;
  border: 1.5px solid var(--aarohi-gold);
  color: var(--aarohi-maroon);
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.aarohi-chip:hover {
  background: linear-gradient(135deg, var(--aarohi-gold-light), var(--aarohi-gold));
  color: #fff;
  border-color: var(--aarohi-gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(201, 169, 110, 0.3);
}
.aarohi-chip:active { transform: translateY(0); }

/* ─────────────────────────────────────────
   FOOTER / INPUT
─────────────────────────────────────────── */
.aarohi-chat-footer {
  padding: 14px;
  background: #fff;
  border-top: 1px solid var(--aarohi-border);
  flex-shrink: 0;
}
.aarohi-chat-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #e6dcc6;
  border-radius: 100px;
  padding: 5px 5px 5px 18px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.aarohi-chat-input-wrap:hover { border-color: var(--aarohi-gold-light); }
.aarohi-chat-input-wrap:focus-within {
  background: #fff;
  border-color: var(--aarohi-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.22);
}
.aarohi-chat-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 14px !important;
  padding: 9px 0 !important;
  font-family: inherit !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: var(--aarohi-maroon);
  box-shadow: none !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
}
.aarohi-chat-input:focus { color: #000000 !important; }
.aarohi-chat-input::placeholder { color: #b5a988 !important; opacity: 1 !important; font-weight: 400 !important; }
.aarohi-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--aarohi-maroon), var(--aarohi-maroon-deep));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(90, 24, 32, 0.25);
}
.aarohi-chat-send:hover {
  transform: scale(1.08) rotate(-8deg);
  box-shadow: 0 6px 14px rgba(90, 24, 32, 0.35);
}
.aarohi-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.aarohi-chat-send svg { width: 16px; height: 16px; }

.aarohi-chat-powered {
  text-align: center;
  font-size: 10px;
  color: var(--aarohi-mute);
  margin-top: 8px;
  letter-spacing: 0.5px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
}

/* AI Badge in header */
.aarohi-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(201,169,110,0.18), rgba(201,169,110,0.08));
  border: 1px solid rgba(201,169,110,0.45);
  color: var(--aarohi-gold);
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
  transition: all 0.3s ease;
}
.aarohi-ai-badge::before {
  content: "✦";
  font-size: 10px;
}
/* "Lite" mode — when Gemini is rate-limited / offline */
.aarohi-ai-badge--lite {
  background: linear-gradient(135deg, rgba(180,180,180,0.18), rgba(180,180,180,0.06));
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
}
.aarohi-ai-badge--lite::before { content: "○"; }
.aarohi-chat-powered span {
  color: var(--aarohi-maroon);
  font-weight: 600;
  font-style: normal;
  font-family: "DM Sans", sans-serif;
  letter-spacing: 0.3px;
}

/* ─────────────────────────────────────────
   MOBILE
─────────────────────────────────────────── */
@media (max-width: 540px) {
  .aarohi-chat-toggle {
    bottom: 18px;
    right: 18px;
    width: 60px;
    height: 60px;
  }
  .aarohi-chat-toggle .aarohi-toggle-tip { display: none; }
  .aarohi-chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    border-radius: 0;
    transform-origin: bottom center;
  }
  .aarohi-chat-toggle.open { display: none; }
  .aarohi-chat-header { padding: 16px 18px; }
  .aarohi-chat-header-info .name { font-size: 18px; }
}
