/* A customer-side conversation demo, not a live WhatsApp client.
   Existing data types are from the business perspective: incoming = customer. */
.phone-mockup {
  width: 100%; max-width: 336px; padding: 7px; border-radius: 43px;
  background: #20262d; border: 1px solid #75808b;
  box-shadow: 0 24px 60px rgba(23,35,29,.20), 0 3px 8px rgba(23,35,29,.16), inset 0 0 0 2px #363d45;
  isolation: isolate;
}
.phone-notch {
  width: 76px; height: 20px; top: 17px; border-radius: 20px;
  background: #20262d; pointer-events: none;
}
.phone-screen { border-radius: 35px; background: #f7f9f8; text-align: start; }
.phone-statusbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 39px; padding: 6px 22px 0; flex-shrink: 0;
  font-size: .75rem; font-weight: 650; color: #202a31; direction: ltr;
}
.phone-status-icons { display: flex; align-items: center; gap: 5px; }
.phone-status-icons svg { width: 15px; height: 15px; }
.phone-status-icons .phone-battery { width: 23px; }
.phone-mockup .chat-header {
  background: #f7f9f8; padding: 10px 12px 13px; gap: 9px;
  border-bottom: 1px solid #dde5e0; min-height: 65px; flex-shrink: 0;
}
.chat-chrome-icon { width: 20px; height: 20px; flex-shrink: 0; color: #258542; }
.phone-mockup .chat-header-avatar {
  width: 36px; height: 36px; flex-shrink: 0; background: #25d366;
  color: #173024; font-size: .75rem; letter-spacing: -.03em;
  border: 1px solid #20c05c;
}
.phone-mockup .chat-header-info { flex: 1; min-width: 0; gap: 2px; }
.phone-mockup .chat-header-name {
  color: #182720; font-size: .9375rem; line-height: 1.25; font-weight: 650;
  overflow-wrap: anywhere;
}
.phone-mockup .chat-header-status { color: #52645a; font-size: .75rem; line-height: 1.3; }
.phone-mockup .chat-body {
  height: 438px; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 14px 12px 18px; gap: 9px; background: #eef4ef;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bdcdc1 transparent;
}
.chat-day {
  align-self: center; padding: 4px 11px; margin-bottom: 5px;
  background: rgba(255,255,255,.94); color: #56635c;
  border-radius: 7px; font-size: .75rem; line-height: 1.35;
  box-shadow: 0 1px 2px rgba(24,39,32,.05);
}
.phone-mockup .chat-bubble {
  max-width: 88%; padding: 8px 10px 5px; border-radius: 11px;
  font-size: .875rem; line-height: 1.42; color: #202a25; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(27,48,36,.09); overflow-wrap: anywhere;
}
.chat-text { display: block; unicode-bidi: plaintext; }
.phone-mockup .chat-incoming {
  align-self: flex-end; background: #d9fdd3; border-radius: 11px 3px 11px 11px;
}
.phone-mockup .chat-outgoing {
  align-self: flex-start; background: #fff; border-radius: 3px 11px 11px 11px;
}
.chat-meta {
  display: flex; justify-content: flex-end; align-items: center; gap: 4px;
  margin-top: 3px; color: #5c6b62; font-size: .75rem; line-height: 1;
  direction: ltr; unicode-bidi: isolate;
}
.chat-read { display: none; width: 17px; height: 13px; color: #167a96; }
.chat-incoming .chat-read { display: block; }
.phone-mockup .typing-indicator {
  align-self: flex-start; background: #fff; border-radius: 3px 11px 11px 11px;
  flex-shrink: 0; margin: 0;
}
.chat-composer {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px 5px;
  background: #f7f9f8; border-top: 1px solid #e0e8e2; color: #69776f;
  flex-shrink: 0; pointer-events: none;
}
.chat-composer-field {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  min-height: 39px; padding: 8px 11px; background: #fff;
  border: 1px solid #dce5df; border-radius: 24px; font-size: .875rem;
}
.chat-composer-field > span { flex: 1; }
.chat-composer svg { width: 20px; height: 20px; flex-shrink: 0; }
.chat-composer-mic {
  display: flex; align-items: center; justify-content: center;
  width: 39px; height: 39px; border-radius: 50%; background: #25d366; color: #173024;
}
.phone-home { height: 20px; display: grid; place-items: center; flex-shrink: 0; }
.phone-home::after { content: ''; width: 100px; height: 4px; background: #25332b; border-radius: 4px; }
.phone-demo-caption {
  width: fit-content; max-width: 100%; margin: 14px auto 0;
  padding: 6px 12px; border: 1px solid #d6eadd; border-radius: 20px;
  background: rgba(255,255,255,.97); color: #42544a; text-align: center;
  font-size: .75rem; line-height: 1.5;
}
[dir="rtl"] .chat-back { transform: scaleX(-1); }
@media (max-width: 767px) {
  .phone-mockup { max-width: 336px; }
  .phone-mockup .chat-body { height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-mockup .chat-bubble { opacity: 1; transform: none; transition: none; }
  .phone-mockup .typing-indicator { display: none; }
}
