/* ================================================
   সালেহা — White · Black · Blue  |  v3
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #1a73e8;
  --blue-dim:  #e8f0fe;
  --blue-dark: #1557b0;
  --black:     #111111;
  --gray-dk:   #3c3c3c;
  --gray:      #6e6e6e;
  --gray-lt:   #d8d8d8;
  --bg:        #f5f5f5;
  --white:     #ffffff;
  --r:         10px;
  --t:         .18s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════════════ */
.skeleton-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: opacity .35s ease, visibility .35s ease;
}
.skeleton-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sk-header {
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-lt);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  justify-content: space-between;
}

.sk-body {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sk-block {
  background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-logo  { width: 120px; height: 32px; border-radius: 6px; }
.sk-nav   { width: 180px; height: 28px; border-radius: 20px; }
.sk-card  { height: 90px; border-radius: var(--r); }
.sk-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sk-chip  { width: 90px; height: 30px; border-radius: 20px; }
.sk-input { height: 52px; border-radius: 26px; }

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-lt);
  height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 300;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Blinking dot */
.pulsing-dot {
  width: 10px; height: 10px;
  background: var(--blue);
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 1.6s step-end infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

.logo-link { display: flex; align-items: center; text-decoration: none; }
.header-logo { height: 34px; width: auto; object-fit: contain; display: block; }

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-dk);
  text-decoration: none;
  border-radius: 8px;
  transition: var(--t);
  font-family: 'Hind Siliguri', sans-serif;
}
.nav-link svg { stroke: var(--gray-dk); flex-shrink: 0; }
.nav-link:hover { background: var(--blue-dim); color: var(--blue); }
.nav-link:hover svg { stroke: var(--blue); }

.btn-call-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--black);
  color: var(--white);
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--t);
  font-family: 'Inter', sans-serif;
  margin-left: 6px;
}
.btn-call-header svg   { stroke: var(--white); flex-shrink: 0; }
.btn-call-header:hover { background: var(--blue); }

/* ══════════════════════════════════════════════
   HAMBURGER MENU
   ══════════════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--t);
  z-index: 400;
}
.hamburger:hover { background: var(--blue-dim); }

.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transform-origin: center;
  transition: transform .3s cubic-bezier(.4,0,.2,1),
              opacity   .3s ease,
              width     .3s ease;
}

/* Open state */
.hamburger.open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .ham-line:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile slide-down menu */
.mobile-menu {
  position: fixed;
  top: 56px;
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-lt);
  z-index: 250;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: transform .28s cubic-bezier(.4,0,.2,1),
              opacity   .28s ease,
              visibility .28s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0 12px;
}

.mob-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--gray-dk);
  text-decoration: none;
  transition: background var(--t), color var(--t);
  border-left: 3px solid transparent;
  animation: menuItemIn .3s ease both;
}
.mob-nav-link svg { stroke: var(--gray); flex-shrink: 0; }
.mob-nav-link:hover { background: var(--blue-dim); color: var(--blue); border-left-color: var(--blue); }
.mob-nav-link:hover svg { stroke: var(--blue); }

.mob-nav-link:nth-child(1) { animation-delay: .04s; }
.mob-nav-link:nth-child(2) { animation-delay: .08s; }
.mob-nav-link:nth-child(3) { animation-delay: .12s; }
.mob-nav-link:nth-child(4) { animation-delay: .16s; }

@keyframes menuItemIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

.mob-call {
  margin: 8px 16px 0;
  background: var(--black);
  color: var(--white);
  border-radius: 10px;
  border-left: 3px solid transparent;
  justify-content: center;
}
.mob-call svg   { stroke: var(--white); }
.mob-call:hover { background: var(--blue); color: var(--white); border-left-color: transparent; }
.mob-call:hover svg { stroke: var(--white); }

/* Dark overlay behind menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 240;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.menu-overlay.open { opacity: 1; visibility: visible; }

/* ══════════════════════════════════════════════
   CHAT LAYOUT
   ══════════════════════════════════════════════ */
.chat-wrapper {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 16px 130px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ══════════════════════════════════════════════
   WELCOME CARD
   ══════════════════════════════════════════════ */
.welcome-card {
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: var(--r);
  padding: 22px 20px;
  text-align: center;
}

.welcome-logo-wrap {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.center-sub {
  font-size: .84rem;
  color: var(--gray);
}

/* ══════════════════════════════════════════════
   QUICK CHIPS
   ══════════════════════════════════════════════ */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--gray-lt);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: .82rem;
  font-family: 'Hind Siliguri', sans-serif;
  color: var(--gray-dk);
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
}
.chip svg       { stroke: var(--gray); flex-shrink: 0; }
.chip:hover     { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }
.chip:hover svg { stroke: var(--blue); }

/* ══════════════════════════════════════════════
   MESSAGES
   ══════════════════════════════════════════════ */
.messages { display: flex; flex-direction: column; gap: 10px; }

.message { display: flex; gap: 9px; animation: msgIn .25s ease both; }
.message.user { flex-direction: row-reverse; }

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

.msg-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.message.bot  .msg-av { background: var(--blue); }
.message.bot  .msg-av svg { stroke: var(--white); }
.message.user .msg-av { background: var(--gray-lt); }
.message.user .msg-av svg { stroke: var(--gray-dk); }

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: .9rem;
  line-height: 1.65;
  word-break: break-word;
}
.message.bot .msg-bubble {
  background: var(--white);
  border: 1px solid var(--gray-lt);
  color: var(--black);
  border-radius: 3px var(--r) var(--r) var(--r);
}
.message.user .msg-bubble {
  background: var(--blue);
  color: var(--white);
  border-radius: var(--r) 3px var(--r) var(--r);
}
.msg-bubble strong { font-weight: 600; }
.msg-bubble ul     { padding-left: 16px; margin-top: 4px; }
.msg-bubble li     { margin-bottom: 3px; }

/* ══════════════════════════════════════════════
   TYPING INDICATOR
   ══════════════════════════════════════════════ */
.typing-indicator { display: flex; gap: 5px; align-items: center; padding: 10px 14px; }
.typing-dot {
  width: 7px; height: 7px;
  background: var(--gray);
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .18s; }
.typing-dot:nth-child(3) { animation-delay: .36s; }
@keyframes bounce {
  0%,60%,100% { transform: translateY(0); opacity:.4; }
  30%          { transform: translateY(-6px); opacity:1; }
}

/* ══════════════════════════════════════════════
   INPUT BAR
   ══════════════════════════════════════════════ */
.input-bar-wrapper {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, var(--bg) 75%, transparent);
  padding: 10px 16px 20px;
  z-index: 100;
}
.input-bar {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--gray-lt);
  border-radius: 24px;
  padding: 7px 7px 7px 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  transition: border-color var(--t);
}
.input-bar:focus-within { border-color: var(--blue); }

#chatInput {
  flex: 1;
  border: none; outline: none;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: .92rem;
  color: var(--black);
  background: transparent;
  resize: none;
  max-height: 110px; min-height: 22px;
  line-height: 1.5;
  padding: 3px 0;
}
#chatInput::placeholder { color: var(--gray); }

.btn-send {
  width: 38px; height: 38px;
  background: var(--blue);
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--t);
  color: var(--white);
}
.btn-send:hover  { background: var(--blue-dark); }
.btn-send:active { transform: scale(.93); }
.btn-send:disabled { background: var(--gray-lt); cursor: not-allowed; transform: none; }
.btn-send svg { fill: var(--white); }

/* ══════════════════════════════════════════════
   FAB: CALL  (single, bottom-right)
   ══════════════════════════════════════════════ */
.fab-call {
  position: fixed;
  bottom: 86px;
  right: 18px;
  height: 48px;
  padding: 0 15px 0 13px;
  background: var(--black);
  color: var(--white);
  border-radius: 24px;
  display: flex; align-items: center; gap: 7px;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  z-index: 150;
  box-shadow: 0 3px 14px rgba(0,0,0,.28);
  animation: callPulse 3s infinite;
  transition: transform var(--t), background var(--t);
}
.fab-call svg { stroke: var(--white); flex-shrink: 0; }
.fab-call:hover { transform: scale(1.04); animation: none; background: var(--blue); }
.fab-call-label { white-space: nowrap; }

@keyframes callPulse {
  0%,100% { box-shadow: 0 3px 14px rgba(0,0,0,.28); }
  50%      { box-shadow: 0 3px 22px rgba(26,115,232,.55), 0 0 0 6px rgba(26,115,232,.12); }
}

/* ══════════════════════════════════════════════
   FAB: PWA INSTALL  (pulsing blue glow)
   ══════════════════════════════════════════════ */
.fab-install {
  position: fixed;
  bottom: 148px;
  right: 18px;
  height: 48px;
  padding: 0 15px 0 13px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 24px;
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  z-index: 150;
  animation: installGlow 2.2s infinite;
  transition: transform var(--t);
}
.fab-install svg { stroke: var(--white); flex-shrink: 0; }
.fab-install:hover { transform: scale(1.06); animation: none; background: var(--blue-dark); }
.fab-install-label { white-space: nowrap; }

@keyframes installGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(26,115,232,.0), 0 3px 12px rgba(26,115,232,.35); }
  40%      { box-shadow: 0 0 0 8px rgba(26,115,232,.18), 0 3px 18px rgba(26,115,232,.55); }
  70%      { box-shadow: 0 0 0 14px rgba(26,115,232,.04), 0 3px 12px rgba(26,115,232,.35); }
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .hamburger   { display: flex; }
}

@media (max-width: 600px) {
  .fab-call    { bottom: 80px; right: 12px; padding: 0 12px 0 10px; font-size: .74rem; height: 44px; }
  .fab-install { bottom: 138px; right: 12px; padding: 0 12px 0 10px; font-size: .74rem; height: 44px; }
}

/* Scrollbar */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-lt); border-radius: 3px; }

.msg-bubble a { color: inherit; text-decoration: underline; }

/* Streaming typing caret */
.stream-caret {
  display: inline-block;
  margin-left: 1px;
  color: var(--blue);
  font-weight: 600;
  animation: caretBlink .9s step-end infinite;
}
@keyframes caretBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── Chatbot CTA chips — minimal & premium ── */
.cta-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s ease;
  border: 1.5px solid transparent;
  line-height: 1;
}
/* Doctors — subtle blue */
.cta-chip--dr {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(26,115,232,.2);
}
.cta-chip--dr:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
/* Tests — subtle gray */
.cta-chip--test {
  background: #f4f4f4;
  color: #444;
  border-color: #e0e0e0;
}
.cta-chip--test:hover {
  background: #222;
  color: var(--white);
  border-color: #222;
}
/* Call — subtle green */
.cta-chip--call {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: rgba(46,125,50,.2);
}
.cta-chip--call:hover {
  background: #2e7d32;
  color: var(--white);
  border-color: #2e7d32;
}
