/* ═══════════════════════════════════════════
   SMRITI AI — Professional Redesign v3
   Perfect alignment, responsive, unique
═══════════════════════════════════════════ */

/* ── TOGGLE BUTTON ──────────────────────── */
.chatbot-toggle {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #060d1f;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 9998;
  animation: rippleOut 2.5s ease-out infinite;
  padding: 0;
  overflow: visible;
}
@keyframes rippleOut {
  0%   { box-shadow: 0 0 0 0px rgba(245,158,11,0.6), 0 4px 20px rgba(245,158,11,0.25); }
  60%  { box-shadow: 0 0 0 14px rgba(245,158,11,0.06), 0 4px 20px rgba(245,158,11,0.25); }
  100% { box-shadow: 0 0 0 18px rgba(245,158,11,0.00), 0 4px 20px rgba(245,158,11,0.25); }
}
.chatbot-toggle::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1.5px dashed rgba(245,158,11,0.45);
  animation: spinRing 7s linear infinite;
}
@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.chatbot-toggle::after {
  content: '';
  position: absolute; inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(245,158,11,0.20);
}
.chatbot-toggle:hover { animation: none; box-shadow: 0 0 0 8px rgba(245,158,11,0.12), 0 8px 28px rgba(245,158,11,0.40); }
.chatbot-toggle:hover::before { animation-duration: 1.5s; }

/* ── CHATBOT TOGGLE ICON ─────────────────── */
.toggle-svg {
  width: 34px; height: 34px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  overflow: visible;
}

/* Bubble + tail float together */
.svg-bubble, .svg-tail {
  animation: bubbleFloat 3s ease-in-out infinite;
  transform-origin: 25px 22px;
}
@keyframes bubbleFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Eyes blink naturally */
.svg-eye-left, .svg-eye-right {
  animation: eyeBlink 4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.svg-eye-right { animation-delay: 0.1s; }
@keyframes eyeBlink {
  0%,90%,100% { transform: scaleY(1); }
  95%          { transform: scaleY(0.1); }
}

/* Mouth dots wave like typing */
.svg-mouth1 {
  animation: mouthWave 1.4s ease-in-out infinite 0s;
  transform-box: fill-box; transform-origin: center;
}
.svg-mouth2 {
  animation: mouthWave 1.4s ease-in-out infinite 0.2s;
  transform-box: fill-box; transform-origin: center;
}
.svg-mouth3 {
  animation: mouthWave 1.4s ease-in-out infinite 0.4s;
  transform-box: fill-box; transform-origin: center;
}
@keyframes mouthWave {
  0%,100% { transform: translateY(0) scale(1); opacity: 0.5; }
  50%      { transform: translateY(-3px) scale(1.2); opacity: 1; }
}

/* Antenna dot pulses */
.svg-antenna-dot {
  animation: antennaPulse 2s ease-in-out infinite;
  transform-box: fill-box; transform-origin: center;
}
@keyframes antennaPulse {
  0%,100% { opacity: 0.4; transform: scale(0.8); }
  50%      { opacity: 1; transform: scale(1.4); }
}

/* Hover — speed everything up */
.chatbot-toggle:hover .svg-bubble,
.chatbot-toggle:hover .svg-tail {
  animation-duration: 0.8s;
}
.chatbot-toggle:hover .svg-mouth1,
.chatbot-toggle:hover .svg-mouth2,
.chatbot-toggle:hover .svg-mouth3 {
  animation-duration: 0.4s;
}
.chatbot-toggle:hover .svg-eye-left,
.chatbot-toggle:hover .svg-eye-right {
  animation: none;
}
.chatbot-toggle:hover .svg-antenna-dot {
  animation: none;
  opacity: 1;
}

.chat-badge {
  position: absolute; top: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ef4444; color: white;
  font-size: 0.58rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
  animation: badgePing 2s ease-in-out infinite;
  z-index: 2;
}
@keyframes badgePing {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* ── CHAT WINDOW ────────────────────────── */
.chatbot-window {
  position: fixed;
  bottom: 104px; right: 28px;
  width: 400px;
  max-height: calc(100vh - 130px);
  min-height: 480px;
  display: flex; flex-direction: column;
  z-index: 9997;
  border-radius: 18px;
  overflow: hidden;
  background: #f0f4f8;
  border: 1px solid rgba(245,158,11,0.15);
  box-shadow: 0 20px 60px rgba(6,13,31,0.22), 0 4px 16px rgba(0,0,0,0.10);
  transform: scale(0.88) translateY(28px);
  opacity: 0; pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1), opacity 0.28s ease;
}
.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1; pointer-events: all;
}

/* ── HEADER ─────────────────────────────── */
.chatbot-header {
  background: #060d1f;
  padding: 0 16px;
  height: 66px;
  min-height: 66px;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 2px solid #f59e0b;
  position: relative; overflow: hidden;
}
.chatbot-header::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(245,158,11,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,158,11,0.03) 1px, transparent 1px);
  background-size: 18px 18px;
}
.chatbot-header-info {
  display: flex; align-items: center; gap: 11px;
  position: relative; z-index: 1;
  flex: 1; min-width: 0;
}
.chatbot-avatar {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(245,158,11,0.10);
  border: 1.5px solid rgba(245,158,11,0.40);
  display: flex; align-items: center; justify-content: center;
  color: #f59e0b; font-size: 1rem;
  flex-shrink: 0;
}
.chatbot-header-text {
  min-width: 0; flex: 1;
}
.chatbot-header-text h4 {
  font-family: var(--font-display);
  font-size: 0.92rem; font-weight: 700;
  color: #ffffff; margin: 0 0 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chatbot-header-text span {
  font-size: 0.62rem; color: rgba(255,255,255,0.38);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.chatbot-header-right {
  display: flex; align-items: center; gap: 6px;
  position: relative; z-index: 1;
  flex-shrink: 0; margin-left: 8px;
}
.chatbot-status {
  display: flex; align-items: center; gap: 4px;
  background: rgba(74,222,128,0.10);
  border: 1px solid rgba(74,222,128,0.22);
  border-radius: 20px; padding: 3px 8px;
  font-size: 0.60rem; color: #4ade80; font-weight: 600;
  white-space: nowrap;
}
.chatbot-status::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: #4ade80; flex-shrink: 0;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.chatbot-minimize,
.chatbot-close {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 7px; cursor: pointer;
  color: rgba(255,255,255,0.50); font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.chatbot-minimize:hover {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.30);
  color: #f59e0b;
}
.chatbot-close:hover {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.30);
  color: #fca5a5;
  transform: rotate(90deg);
}

/* ── MESSAGES AREA ───────────────────────── */
.chatbot-messages {
  flex: 1; overflow-y: auto;
  padding: 16px 14px 10px;
  display: flex; flex-direction: column; gap: 12px;
  background: #f0f4f8;
}
.chatbot-messages::-webkit-scrollbar { width: 3px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.22); border-radius: 4px; }

/* Date divider */
.chat-date-divider {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.60rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 1px;
}
.chat-date-divider::before,
.chat-date-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}

/* Message rows */
.chat-msg {
  display: flex; gap: 8px; align-items: flex-start;
  animation: msgIn 0.26s ease;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.user { flex-direction: row-reverse; }

/* Avatars */
.chat-msg-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  background: #060d1f;
  border: 1px solid rgba(245,158,11,0.28);
  display: flex; align-items: center; justify-content: center;
  color: #f59e0b; font-size: 0.62rem; flex-shrink: 0;
  margin-top: 2px;
}
.chat-msg.user .chat-msg-avatar {
  background: #f59e0b; color: #060d1f; border-color: #f59e0b;
}

/* Bubble wrapper */
.chat-bubble-wrap {
  display: flex; flex-direction: column; gap: 3px;
  max-width: calc(100% - 42px);
  min-width: 0;
}
.chat-msg.user .chat-bubble-wrap { align-items: flex-end; }

/* Sender label */
.chat-sender {
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
  color: #94a3b8; padding: 0 2px;
}

/* Bubbles */
.chat-msg-bubble {
  padding: 10px 14px;
  font-size: 0.84rem; line-height: 1.70;
  word-break: break-word; word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  box-sizing: border-box;
}
.chat-msg.bot .chat-msg-bubble {
  background: #ffffff;
  color: #060d1f;
  border-radius: 3px 14px 14px 14px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.chat-msg.user .chat-msg-bubble {
  background: #060d1f;
  color: #ffffff;
  border-radius: 14px 3px 14px 14px;
  box-shadow: 0 2px 10px rgba(6,13,31,0.18);
}
.chat-msg-bubble strong { font-weight: 700; }
.chat-msg-bubble a {
  color: #f59e0b; font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted rgba(245,158,11,0.45);
  word-break: break-all;
}
.chat-msg-bubble a:hover { border-bottom-style: solid; }

/* Bullet point fix */
.chat-msg-bubble br { display: block; margin: 1px 0; }

/* Timestamp */
.chat-msg-time {
  font-size: 0.55rem; color: #94a3b8;
  padding: 0 2px;
}
.chat-msg.user .chat-msg-time { text-align: right; }

/* Typing indicator */
.chat-typing .chat-msg-bubble { padding: 12px 16px; width: auto; }
.typing-dots { display: flex; gap: 5px; align-items: center; height: 14px; }
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b;
  animation: typingBounce 1.1s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes typingBounce {
  0%,80%,100% { transform: translateY(0) scale(0.75); opacity: 0.35; }
  40%          { transform: translateY(-7px) scale(1); opacity: 1; }
}

/* ── SUGGESTIONS ─────────────────────────── */
.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 14px 10px;
  background: #ffffff;
  border-top: 1px solid rgba(245,158,11,0.12);
  flex-shrink: 0;
}
.chat-suggest-btn {
  background: #f8fafc;
  border: 1px solid rgba(245,158,11,0.28);
  color: #060d1f;
  font-size: 0.72rem; font-weight: 600;
  padding: 6px 12px; border-radius: 6px;
  cursor: pointer; font-family: var(--font-body);
  text-align: left; line-height: 1.45;
  transition: all 0.18s ease;
  display: inline-flex; align-items: flex-start; gap: 5px;
  max-width: 48%; box-sizing: border-box;
  word-break: break-word;
}
.chat-suggest-btn::before {
  content: '→'; color: #f59e0b;
  font-size: 0.72rem; flex-shrink: 0; margin-top: 1px;
}
.chat-suggest-btn:hover {
  background: #f59e0b; color: #060d1f;
  border-color: #f59e0b; transform: translateX(3px);
}
.chat-suggest-btn:hover::before { color: #060d1f; }

/* ── ENQUIRY FORM ────────────────────────── */
.chat-enquiry-form {
  padding: 14px 16px;
  background: #ffffff;
  border-top: 2px solid #f59e0b;
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
  animation: slideUp 0.28s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-enquiry-title {
  font-size: 0.76rem; font-weight: 700; color: #060d1f;
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}
.chat-enquiry-title i { color: #f59e0b; }
.chat-enquiry-form input,
.chat-enquiry-form textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid #e2e8f0; border-radius: 7px;
  font-family: var(--font-body); font-size: 0.80rem;
  color: #060d1f; background: #f8fafc;
  outline: none; resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.chat-enquiry-form input:focus,
.chat-enquiry-form textarea:focus {
  border-color: #f59e0b; background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.09);
}
.chat-enquiry-form textarea { min-height: 64px; }
.chat-enquiry-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
}
.chat-enquiry-submit {
  background: #f59e0b; color: #060d1f;
  border: none; border-radius: 7px;
  padding: 10px; font-weight: 700; font-size: 0.82rem;
  cursor: pointer; font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(245,158,11,0.28);
}
.chat-enquiry-submit:hover {
  background: #fbbf24; transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(245,158,11,0.38);
}
.chat-enquiry-cancel {
  background: none; border: none; color: #94a3b8;
  font-size: 0.70rem; cursor: pointer; text-align: center;
  font-family: var(--font-body); transition: color 0.2s;
}
.chat-enquiry-cancel:hover { color: #060d1f; }

/* ── INPUT BAR ───────────────────────────── */
.chatbot-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,0.07);
  background: #ffffff; flex-shrink: 0;
}
.chatbot-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-family: var(--font-body); font-size: 0.84rem;
  color: #060d1f; background: #f8fafc;
  outline: none; transition: all 0.22s;
  min-width: 0;
}
.chatbot-input:focus {
  border-color: #f59e0b; background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.09);
}
.chatbot-input::placeholder { color: #94a3b8; }
.chatbot-send {
  width: 40px; height: 40px; border-radius: 10px;
  background: #060d1f; color: #f59e0b;
  border: 1.5px solid rgba(245,158,11,0.30);
  cursor: pointer; font-size: 0.84rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.22s;
}
.chatbot-send:hover {
  background: #f59e0b; color: #060d1f;
  border-color: #f59e0b; transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(245,158,11,0.32);
}

/* ── FOOTER ──────────────────────────────── */
.chatbot-footer-bar {
  text-align: center; padding: 6px 14px;
  font-size: 0.60rem; color: #94a3b8;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.05); flex-shrink: 0;
}
.chatbot-footer-bar span { color: #f59e0b; font-weight: 700; }

/* ── TABLET 768px ────────────────────────── */
@media (max-width: 768px) {
  .chatbot-window {
    right: 12px; left: 12px;
    width: auto; bottom: 100px;
    max-height: calc(100vh - 120px);
    min-height: 360px;
    border-radius: 16px;
  }
  .chatbot-toggle { right: 18px; bottom: 22px; width: 56px; height: 56px; }
  .toggle-svg { width: 40px; height: 40px; }
}

/* ── MOBILE 480px ────────────────────────── */
@media (max-width: 480px) {
  .chatbot-window {
    right: 8px; left: 8px;
    bottom: 78px;
    width: auto;
    max-height: 58vh;
    min-height: unset;
    border-radius: 16px;
    transform-origin: bottom right;
  }
  .chatbot-toggle {
    right: 12px; bottom: 14px;
    width: 50px; height: 50px;
  }
  .toggle-svg { width: 36px; height: 36px; }
  .chatbot-header { height: 56px; padding: 0 12px; }
  .chatbot-avatar { width: 32px; height: 32px; border-radius: 7px; font-size: 0.85rem; }
  .chatbot-header-text h4 { font-size: 0.80rem; }
  .chatbot-header-text span { font-size: 0.56rem; }
  .chatbot-status { font-size: 0.56rem; padding: 2px 6px; }
  .chatbot-minimize,
  .chatbot-close { width: 24px; height: 24px; font-size: 0.70rem; }
  .chatbot-messages { padding: 10px 10px 6px; gap: 8px; }
  .chat-msg-bubble { font-size: 0.78rem; padding: 8px 11px; line-height: 1.62; }
  .chat-msg-avatar { width: 24px; height: 24px; border-radius: 6px; font-size: 0.58rem; }
  .chat-bubble-wrap { max-width: calc(100% - 34px); }
  .chat-sender { font-size: 0.54rem; }
  .chat-msg-time { font-size: 0.52rem; }
  .chat-suggestions { padding: 6px 10px 7px; gap: 5px; }
  .chat-suggest-btn {
    font-size: 0.66rem; padding: 4px 9px;
    max-width: 48%;
  }
  .chatbot-input { font-size: 0.80rem; padding: 8px 12px; }
  .chatbot-send { width: 36px; height: 36px; font-size: 0.78rem; border-radius: 8px; }
  .chatbot-input-bar { padding: 8px 10px 10px; }
  .chat-enquiry-row { grid-template-columns: 1fr; }
  .chat-enquiry-form { padding: 10px 12px; gap: 6px; }
  .chat-enquiry-form input,
  .chat-enquiry-form textarea { font-size: 0.76rem; padding: 7px 10px; }
  .chat-enquiry-submit { padding: 8px; font-size: 0.78rem; }
  .chatbot-footer-bar { font-size: 0.55rem; padding: 4px; }
}

/* ── SMALL MOBILE 360px ──────────────────── */
@media (max-width: 360px) {
  .chatbot-window {
    right: 4px; left: 4px;
    max-height: 54vh;
    bottom: 72px;
  }
  .chatbot-toggle { right: 8px; bottom: 10px; width: 46px; height: 46px; }
  .toggle-svg { width: 34px; height: 34px; }
  .chat-msg-bubble { font-size: 0.76rem; }
  .chatbot-status { display: none; }
  .chat-suggest-btn { max-width: 100%; }
}

.chatbot-messages {
  flex: 1; overflow-y: auto;
  /* add this */
  min-height: 0;
}