/* ============================================================
   WEDDING WEBSITE — chat.css
   Inline "Ask us anything" chatbot (bottom of live pages).
   ============================================================ */

.chat {
  max-width: 640px;
  margin: 0 auto;
  border-radius: 24px;
  padding: 22px 18px 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  color: #f5f0ea;
}

.chat-head p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: rgba(245, 240, 234, 0.55);
  margin-top: 3px;
}

.chat-orb {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff4d6, transparent 45%),
    conic-gradient(from 0deg, #c9a96e, #e0607e, #8a6bd6, #c9a96e);
  box-shadow: 0 0 24px rgba(201, 169, 110, 0.45);
  animation: chatOrb 8s linear infinite;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 2px;
  max-height: 420px;
  min-height: 120px;
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.chat-msg { display: flex; animation: chatIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
.chat-msg--user { justify-content: flex-end; }

.chat-bubble {
  max-width: 85%;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  padding: 11px 15px;
  border-radius: 18px;
  overflow-wrap: anywhere;
}

.chat-msg--bot .chat-bubble {
  color: #f5f0ea;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 6px;
}

.chat-msg--user .chat-bubble {
  color: #0d0c0b;
  font-weight: 400;
  background: linear-gradient(135deg, #f1dcab, #c9a96e);
  border-bottom-right-radius: 6px;
}

.chat-msg.is-error .chat-bubble { border-color: rgba(255, 111, 97, 0.4); color: rgba(245, 240, 234, 0.8); }

.chat-bubble b { font-weight: 500; }
.chat-bubble a { color: #ecd29c; text-underline-offset: 2px; }
.chat-msg--user .chat-bubble a { color: #0d0c0b; }

.chat-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 240, 234, 0.6);
  animation: chatDot 1.1s ease-in-out infinite;
}
.chat-typing i:nth-child(2) { animation-delay: 0.15s; }
.chat-typing i:nth-child(3) { animation-delay: 0.3s; }

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 2px 14px;
}

.chat-suggest[hidden] { display: none; }

.chat-chip {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: rgba(245, 240, 234, 0.85);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.chat-chip:hover { background: rgba(201, 169, 110, 0.14); border-color: rgba(201, 169, 110, 0.7); transform: translateY(-1px); }

.chat-form {
  position: relative;
  display: flex;
  align-items: center;
}

.chat-input {
  flex: 1;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  color: #f5f0ea;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 14px 58px 14px 20px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.chat-input::placeholder { color: rgba(245, 240, 234, 0.35); }
.chat-input:focus { border-color: #c9a96e; box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.15); }

.chat-send {
  position: absolute;
  right: 6px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #0d0c0b;
  background: linear-gradient(135deg, #f1dcab, #c9a96e);
  cursor: pointer;
  transition: transform 0.25s, opacity 0.25s;
}

.chat-send:hover { transform: scale(1.06); }
.chat-send:disabled { opacity: 0.5; cursor: default; transform: none; }

.chat-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
  margin-top: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(245, 240, 234, 0.4);
  text-align: center;
}

.chat-foot a { color: rgba(245, 240, 234, 0.65); }

.chat-clear {
  font: inherit;
  color: rgba(245, 240, 234, 0.55);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .chat { padding: 18px 12px 14px; border-radius: 20px; }
  .chat-log { max-height: 360px; }
  .chat-bubble { max-width: 90%; font-size: 13.5px; }
}

@keyframes chatIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes chatDot { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes chatOrb { to { filter: hue-rotate(360deg); } }

/* Floating assistant drawer (Sangeet). */
.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 9px;
  color: #f5f0ea;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  background: rgba(20, 18, 15, 0.94);
  border: 1px solid rgba(201, 169, 110, 0.42);
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.chat-fab:hover { transform: translateY(-2px); border-color: rgba(201, 169, 110, 0.78); }
.chat-fab .chat-orb { width: 34px; height: 34px; }

.chat-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 78;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-drawer-backdrop[hidden] { display: none; }
.chat-drawer-backdrop.is-open { opacity: 1; }

.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  width: min(440px, 100vw);
  padding: 62px 18px 20px;
  background: #11100e;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.52);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
  overflow-y: auto;
}

.chat-drawer.is-open { transform: translateX(0); visibility: visible; }
.chat-drawer .chat { max-width: none; min-height: calc(100vh - 82px); margin: 0; }
.chat-drawer .chat-log { max-height: calc(100vh - 360px); }

.chat-drawer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  color: rgba(245, 240, 234, 0.75);
  font: 300 28px/1 sans-serif;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  cursor: pointer;
}

body.chat-drawer-open { overflow: hidden; }

@media (max-width: 600px) {
  .chat-fab { right: 14px; bottom: 14px; }
  .chat-fab > span:last-child { display: none; }
  .chat-fab { padding: 8px; }
  .chat-drawer { padding: 58px 10px 12px; }
  .chat-drawer .chat-log { max-height: calc(100vh - 330px); }
}
