/* ============================================
   WhatsApp Mock UI Styles
   ============================================ */

:root {
  --wa-green: #075E54;
  --wa-green-dark: #00554A;
  --wa-green-header: #F7F7F7;
  --wa-header-text: #000000;
  --wa-teal: #25D366;
  --wa-bg: #EFEAE2;
  --wa-bg-doodle: #E4DDD5;
  --wa-bubble-bot: #FFFFFF;
  --wa-bubble-user: #E7FFDB;
  --wa-bubble-system: rgba(255, 255, 255, 0.9);
  --wa-text: #000000;
  --wa-text-secondary: #8E8E93;
  --wa-timestamp: rgba(0, 0, 0, 0.40);
  --wa-timestamp-user: rgba(0, 0, 0, 0.35);
  --wa-blue-tick: #34B7F1;
  --wa-button-blue: #007AFF;
  --wa-divider: #E5E5EA;
  --wa-input-bg: #FFFFFF;
  --wa-header-height: 44px;
  --wa-input-height: 52px;
  --frame-width: 375px;
  --frame-height: 812px;
  --frame-radius: 44px;
  --frame-bezel: 12px;
}

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

body.chat-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* ============================================
   Phone Frame (Desktop Only)
   ============================================ */

.phone-frame {
  position: relative;
  width: var(--frame-width);
  height: var(--frame-height);
  border-radius: var(--frame-radius);
  background: #000;
  padding: var(--frame-bezel);
  box-shadow:
    0 0 0 2px #333,
    0 0 0 4px #1a1a1a,
    0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 32px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 100;
}

.phone-frame::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: #555;
  border-radius: 3px;
  z-index: 100;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--frame-radius) - var(--frame-bezel));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--wa-bg);
  position: relative;
}

/* ============================================
   WhatsApp Header
   ============================================ */

/* Status bar spacer — accounts for the dynamic island on desktop frame */
.wa-status-bar {
  background: var(--wa-green-header);
  height: 44px;
  flex-shrink: 0;
}

.wa-header {
  background: var(--wa-green-header);
  color: var(--wa-header-text);
  padding: 0 12px 0 0;
  height: var(--wa-header-height);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  z-index: 10;
  border-bottom: 0.5px solid #C6C6C8;
}

.wa-header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--wa-button-blue);
}

.wa-header-back svg {
  fill: var(--wa-button-blue);
  width: 22px;
  height: 22px;
}

.wa-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wa-header-info {
  flex: 1;
  min-width: 0;
}

.wa-header-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--wa-header-text);
}

.wa-header-status {
  font-size: 12px;
  color: var(--wa-text-secondary);
  line-height: 1.2;
}

.wa-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.wa-header-actions svg {
  fill: var(--wa-button-blue);
  width: 22px;
  height: 22px;
  cursor: pointer;
  padding: 2px;
}

/* ============================================
   Chat Area
   ============================================ */

.wa-chat {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: var(--wa-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cdefs%3E%3Cstyle%3E.c%7Bfill:%23cec5bb;opacity:0.25%7D%3C/style%3E%3C/defs%3E%3Cpath class='c' d='M20 15c2 0 3-1 3-3s-1-3-3-3-3 1-3 3 1 3 3 3zm0-4.5c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5z'/%3E%3Cpath class='c' d='M65 45l-3-6h-4l-3 6h2l.5-1h5l.5 1h2zm-5.5-2.5L61 39l1.5 3.5h-3z'/%3E%3Cpath class='c' d='M110 20c0-3.3-2.7-6-6-6h-8v12h3v-4h3.5l2.5 4h3.5l-2.8-4.3c1.4-.9 2.3-2.4 2.3-4.1V20h0zm-3 1.3c0 1-1 1.7-2 1.7h-4v-4h4c1.1 0 2 .7 2 1.7v.6z'/%3E%3Ccircle class='c' cx='160' cy='60' r='4'/%3E%3Cpath class='c' d='M200 85l5-8h-3l-3.5 5.5L195 77h-3l5 8z'/%3E%3Cpath class='c' d='M45 95c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3z'/%3E%3Cpath class='c' d='M250 120l-4 8h2.5l1-2h3l1 2h2.5l-4-8h-2zm.5 4.5l1-2 1 2h-2z'/%3E%3Cpath class='c' d='M140 150c0 2.2 1.8 4 4 4s4-1.8 4-4-1.8-4-4-4-4 1.8-4 4zm6.5 0c0 1.4-1.1 2.5-2.5 2.5s-2.5-1.1-2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5z'/%3E%3Cpath class='c' d='M80 180h-2v8h6v-2h-4v-6z'/%3E%3Cpath class='c' d='M225 200c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3zm0 4.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z'/%3E%3Cpath class='c' d='M30 230h8v-2h-3v-6h-2v6h-3v2z'/%3E%3Cpath class='c' d='M170 260c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z'/%3E%3Cpath class='c' d='M270 40l2-4h-1.5l-1.2 2.5L268.2 36h-1.5l2 4z'/%3E%3Cpath class='c' d='M120 75h-4v6h1.5v-2h2c1.4 0 2.5-1.1 2.5-2s-1.1-2-2.5-2h.5zm-.5 2.5h-2v-1.5h2c.6 0 1 .3 1 .7s-.4.8-1 .8z'/%3E%3Crect class='c' x='185' y='145' width='6' height='1.5' rx='.75'/%3E%3Crect class='c' x='185' y='148' width='6' height='1.5' rx='.75'/%3E%3Crect class='c' x='185' y='151' width='4' height='1.5' rx='.75'/%3E%3Cpath class='c' d='M60 210c0-1.7-1.3-3-3-3h-4v8h1.5v-3h1.7l1.8 3h1.8l-2-3.2c1-.5 1.7-1.3 1.7-2.4V210h-.5zm-1.5.4c0 .6-.6 1.1-1.3 1.1H54.5v-2.5h2.7c.7 0 1.3.5 1.3 1.1v.3z'/%3E%3Cpath class='c' d='M280 170l-2.5 4-2.5-4h-1.5v6h1.5v-3.8l2 3.2h1l2-3.2v3.8h1.5v-6h-1.5z'/%3E%3Cpath class='c' d='M100 280h4v-1.5h-2.5v-1h2v-1.5h-2v-1h2.5V274h-4v6z'/%3E%3C/svg%3E");
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.wa-chat::-webkit-scrollbar {
  width: 4px;
}

.wa-chat::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

/* ============================================
   Message Bubbles
   ============================================ */

.wa-message-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: messageAppear 200ms ease-out forwards;
}

.wa-message-row.bot {
  align-self: flex-start;
}

.wa-message-row.user {
  align-self: flex-end;
}

.wa-bubble {
  padding: 6px 7px 8px 9px;
  border-radius: 7.5px;
  font-size: 14.2px;
  line-height: 19px;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.wa-message-row.bot .wa-bubble {
  background: var(--wa-bubble-bot);
  color: var(--wa-text);
  border-top-left-radius: 0;
}

.wa-message-row.bot .wa-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 13px;
  background: var(--wa-bubble-bot);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.wa-message-row.user .wa-bubble {
  background: var(--wa-bubble-user);
  color: var(--wa-text);
  border-top-right-radius: 0;
}

.wa-message-row.user .wa-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  width: 8px;
  height: 13px;
  background: var(--wa-bubble-user);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* Hide tail for consecutive same-sender messages */
.wa-message-row.bot + .wa-message-row.bot .wa-bubble {
  border-top-left-radius: 8px;
}

.wa-message-row.bot + .wa-message-row.bot .wa-bubble::before {
  display: none;
}

.wa-timestamp {
  font-size: 11px;
  color: var(--wa-timestamp);
  float: right;
  margin-left: 6px;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  line-height: 15px;
}

.wa-message-row.user .wa-timestamp {
  color: var(--wa-timestamp-user);
}

.wa-tick {
  display: inline-flex;
}

.wa-tick svg {
  width: 16px;
  height: 16px;
  fill: var(--wa-blue-tick);
}

/* ============================================
   System Message
   ============================================ */

.wa-system {
  align-self: center;
  background: rgba(255, 255, 255, 0.75);
  color: #54656F;
  font-size: 12.5px;
  padding: 5px 12px 6px;
  border-radius: 7.5px;
  text-align: center;
  max-width: 85%;
  margin: 2px 0;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.08);
  animation: messageAppear 200ms ease-out forwards;
  line-height: 1.4;
}

.wa-system.encryption {
  font-size: 11.5px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  background: rgba(255, 242, 196, 0.75);
  color: #54656F;
}

.wa-system.encryption svg {
  width: 12px;
  height: 12px;
  fill: #54656F;
  flex-shrink: 0;
}

/* ============================================
   Quick Reply Buttons
   ============================================ */

.wa-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  max-width: 85%;
  animation: buttonsAppear 300ms ease-out forwards;
  animation-delay: 300ms;
  opacity: 0;
}

.wa-quick-reply {
  background: #FFFFFF;
  border: none;
  border-radius: 7.5px;
  padding: 7px 16px;
  color: var(--wa-button-blue);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 150ms;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  font-family: inherit;
}

.wa-quick-reply:hover {
  background: #F5F5F5;
}

.wa-quick-reply:active {
  background: #EDEDED;
}

.wa-quick-reply.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================
   CTA Button
   ============================================ */

.wa-cta-button {
  background: #FFFFFF;
  border: none;
  border-radius: 7.5px;
  padding: 7px 16px;
  color: var(--wa-button-blue);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  max-width: 85%;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  animation: buttonsAppear 300ms ease-out forwards;
  animation-delay: 300ms;
  opacity: 0;
  transition: background 150ms;
  font-family: inherit;
}

.wa-cta-button:hover {
  background: #F5F5F5;
}

.wa-cta-button svg {
  width: 16px;
  height: 16px;
  fill: var(--wa-button-blue);
}

/* ============================================
   List Message Button
   ============================================ */

.wa-list-button {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--wa-button-blue);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 6px;
  font-family: inherit;
}

.wa-list-button svg {
  width: 18px;
  height: 18px;
  fill: var(--wa-button-blue);
}

/* ============================================
   Order Details — Chat bubble (compact)
   ============================================ */

.wa-order-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
}

.wa-order-preview-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-order-preview-icon svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.wa-order-preview-text {
  flex: 1;
  min-width: 0;
}

.wa-order-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wa-text);
}

.wa-order-preview-amount {
  font-size: 13px;
  color: var(--wa-text-secondary);
}

.wa-order-review-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  color: var(--wa-button-blue);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 6px;
  font-family: inherit;
}

/* ============================================
   Order Details — Full-screen overlay
   ============================================ */

.wa-order-overlay {
  position: absolute;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  background: #F0F2F5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.wa-order-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wa-order-header {
  background: var(--wa-green-header);
  color: var(--wa-header-text);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 0.5px solid #C6C6C8;
}

.wa-order-header-back {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.wa-order-header-back svg {
  width: 24px;
  height: 24px;
  fill: var(--wa-button-blue);
}

.wa-order-header-title {
  font-size: 17px;
  font-weight: 600;
}

/* Zigzag torn edge */
.wa-order-zigzag {
  height: 12px;
  background: linear-gradient(135deg, #F0F2F5 33.33%, transparent 33.33%) 0 0,
              linear-gradient(225deg, #F0F2F5 33.33%, transparent 33.33%) 0 0;
  background-size: 12px 12px;
  background-color: white;
  flex-shrink: 0;
}

.wa-order-body {
  flex: 1;
  overflow-y: auto;
  background: white;
}

.wa-order-business {
  text-align: center;
  padding: 24px 16px 20px;
}

.wa-order-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
}

.wa-order-business-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--wa-text);
  margin-bottom: 4px;
}

.wa-order-id {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-bottom: 10px;
}

.wa-order-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E8E8E8;
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--wa-text);
}

.wa-order-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--wa-button-blue);
}

/* Line items */
.wa-order-items {
  padding: 0 16px;
  border-top: 1px dashed #DDD;
}

.wa-order-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  font-size: 15px;
  color: var(--wa-text);
}

.wa-order-item + .wa-order-item {
  border-top: 1px solid #F0F0F0;
}

.wa-order-item-label {
  color: var(--wa-text-secondary);
}

.wa-order-item-value {
  font-weight: 500;
  text-align: right;
}

/* Expiry */
.wa-order-expiry {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--wa-text-secondary);
  border-top: 1px dashed #DDD;
}

/* Total & checkout */
.wa-order-footer {
  background: white;
  border-top: 1px solid #E0E0E0;
  padding: 16px;
  flex-shrink: 0;
}

.wa-order-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  color: var(--wa-text);
  margin-bottom: 14px;
}

.wa-order-checkout {
  width: 100%;
  padding: 14px;
  background: var(--wa-button-blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
  font-family: inherit;
}

.wa-order-checkout:hover {
  background: #0066DD;
}

.wa-order-terms {
  margin-top: 12px;
  font-size: 11px;
  color: var(--wa-text-secondary);
  text-align: center;
  line-height: 1.5;
}

/* ============================================
   Typing Indicator
   ============================================ */

.wa-typing-row {
  display: flex;
  align-self: flex-start;
  max-width: 85%;
  animation: messageAppear 200ms ease-out forwards;
}

.wa-typing {
  background: var(--wa-bubble-bot);
  padding: 10px 14px;
  border-radius: 7.5px;
  border-top-left-radius: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  position: relative;
}

.wa-typing::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 13px;
  background: var(--wa-bubble-bot);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.wa-typing-dot {
  width: 8px;
  height: 8px;
  background: #ACACAC;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.wa-typing-dot:nth-child(1) { animation-delay: 0ms; }
.wa-typing-dot:nth-child(2) { animation-delay: 200ms; }
.wa-typing-dot:nth-child(3) { animation-delay: 400ms; }

/* ============================================
   List Bottom Sheet
   ============================================ */

.wa-list-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.wa-list-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wa-list-sheet {
  background: white;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: var(--frame-width);
  max-height: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 300ms ease-out;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.wa-list-overlay.active .wa-list-sheet {
  transform: translateY(0);
}

.wa-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--wa-divider);
  flex-shrink: 0;
}

.wa-list-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--wa-text);
}

.wa-list-close {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-list-close svg {
  width: 20px;
  height: 20px;
  fill: var(--wa-text-secondary);
}

.wa-list-options {
  padding: 8px 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wa-list-option {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 150ms;
}

.wa-list-option:hover {
  background: #F5F5F5;
}

.wa-list-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #CCC;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 150ms;
}

.wa-list-option.selected .wa-list-radio {
  border-color: var(--wa-button-blue);
}

.wa-list-option.selected .wa-list-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wa-button-blue);
}

.wa-list-option-text {
  flex: 1;
}

.wa-list-option-title {
  font-size: 15px;
  color: var(--wa-text);
}

.wa-list-option-desc {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-top: 2px;
}

.wa-list-submit {
  margin: 8px 16px 16px;
  padding: 12px;
  background: var(--wa-button-blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  width: calc(100% - 32px);
  cursor: pointer;
  transition: background 150ms;
  flex-shrink: 0;
  border-top: 1px solid var(--wa-divider);
}

.wa-list-submit:hover {
  background: #0066DD;
}

.wa-list-submit:disabled {
  background: #CCC;
  cursor: not-allowed;
}

/* ============================================
   Rich List (Therapist cards with photos)
   ============================================ */

.wa-list-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wa-text);
  padding: 14px 16px 8px;
}

.wa-list-option.rich {
  padding: 12px 16px;
  gap: 12px;
  align-items: flex-start;
}

.wa-list-option-photo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.wa-list-option.rich .wa-list-option-text {
  flex: 1;
  min-width: 0;
}

.wa-list-option.rich .wa-list-option-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wa-text);
  line-height: 1.3;
}

.wa-list-option-subtitle {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-top: 1px;
}

.wa-list-option-meta {
  font-size: 12px;
  color: #34C759;
  margin-top: 3px;
  font-weight: 500;
}

.wa-list-option.rich + .wa-list-option.rich {
  border-top: 1px solid #F0F0F0;
}

/* ============================================
   Hero Option (Find Me a Therapist banner)
   ============================================ */

.wa-list-hero-option {
  margin: 12px 16px 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #F0F7FF 0%, #F5F0FF 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 150ms, box-shadow 150ms;
  border: 1px solid rgba(0, 122, 255, 0.1);
}

.wa-list-hero-option:hover {
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.12);
}

.wa-list-hero-option:active {
  transform: scale(0.98);
}

.wa-list-hero-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.wa-list-hero-text {
  flex: 1;
  min-width: 0;
}

.wa-list-hero-title {
  font-size: 15px;
  font-weight: 600;
  color: #007AFF;
  line-height: 1.3;
}

.wa-list-hero-subtitle {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-top: 1px;
}

.wa-list-hero-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: #007AFF;
  opacity: 0.6;
}

/* ============================================
   WhatsApp Flow Modal
   ============================================ */

.wa-flow-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.wa-flow-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wa-flow-modal {
  background: white;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: var(--frame-width);
  max-height: 85%;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 300ms ease-out;
}

.wa-flow-overlay.active .wa-flow-modal {
  transform: translateY(0);
}

.wa-flow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--wa-divider);
  flex-shrink: 0;
}

.wa-flow-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--wa-text);
}

.wa-flow-close {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-flow-close svg {
  width: 20px;
  height: 20px;
  fill: var(--wa-text-secondary);
}

.wa-flow-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
}

.wa-flow-field {
  margin-bottom: 20px;
}

.wa-flow-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--wa-text-secondary);
  margin-bottom: 6px;
  display: block;
}

.wa-flow-select,
.wa-flow-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #DDD;
  border-radius: 8px;
  font-size: 15px;
  color: var(--wa-text);
  background: white;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 200ms;
}

.wa-flow-select:focus,
.wa-flow-input:focus {
  border-color: var(--wa-button-blue);
}

.wa-flow-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23667781' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
  cursor: pointer;
}

.wa-flow-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--wa-divider);
  flex-shrink: 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.wa-flow-submit {
  width: 100%;
  padding: 14px;
  background: var(--wa-button-blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}

.wa-flow-submit:hover {
  background: #0066DD;
}

.wa-flow-submit:disabled {
  background: #CCC;
  cursor: not-allowed;
}

/* Step indicator dots */
.wa-flow-steps {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.wa-flow-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #DDD;
  transition: background 200ms;
}

.wa-flow-step-dot.active {
  background: var(--wa-button-blue);
}

/* ============================================
   UPI Payment Modal
   ============================================ */

.wa-payment-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.wa-payment-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wa-payment-modal {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 320px;
  padding: 24px;
  text-align: center;
  transform: scale(0.95);
  transition: transform 300ms ease-out;
}

.wa-payment-overlay.active .wa-payment-modal {
  transform: scale(1);
}

.wa-payment-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--wa-text);
  margin-bottom: 4px;
}

.wa-payment-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--wa-text);
  margin-bottom: 20px;
}

.wa-payment-label {
  font-size: 13px;
  color: var(--wa-text-secondary);
  margin-bottom: 12px;
}

.wa-payment-apps {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.wa-payment-app {
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  border: none;
  background: none;
  transition: background 150ms;
}

.wa-payment-app:hover {
  background: #F5F5F5;
}

.wa-payment-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.wa-payment-app-icon.gpay { background: #4285F4; }
.wa-payment-app-icon.phonepe { background: #5F259F; }
.wa-payment-app-icon.paytm { background: #00BAF2; }

.wa-payment-app-name {
  font-size: 11px;
  color: var(--wa-text);
}

.wa-payment-cancel {
  background: none;
  border: none;
  color: var(--wa-text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
}

/* Payment Processing State */
.wa-payment-processing {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.wa-payment-processing.active {
  display: flex;
}

.wa-payment-selector {
  display: block;
}

.wa-payment-selector.hidden {
  display: none;
}

.wa-payment-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #E0E0E0;
  border-top: 3px solid var(--wa-button-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.wa-payment-processing-text {
  font-size: 15px;
  color: var(--wa-text-secondary);
}

/* Payment Success State */
.wa-payment-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.wa-payment-success.active {
  display: flex;
}

.wa-payment-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #34C759;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successPop 400ms ease-out;
}

.wa-payment-check svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.wa-payment-success-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--wa-text);
}

/* ============================================
   Input Bar (Decorative)
   ============================================ */

.wa-input-bar {
  background: var(--wa-green-header);
  padding: 4px 8px 20px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  border-top: 0.5px solid #C6C6C8;
}

.wa-input-field {
  flex: 1;
  background: var(--wa-input-bg);
  border-radius: 18px;
  padding: 6px 8px 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 0.5px solid #C6C6C8;
}

.wa-input-field svg {
  width: 22px;
  height: 22px;
  fill: var(--wa-text-secondary);
  flex-shrink: 0;
}

.wa-input-placeholder {
  flex: 1;
  font-size: 15px;
  color: #C7C7CC;
  user-select: none;
}

.wa-input-mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wa-button-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-input-mic svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* ============================================
   Animations
   ============================================ */

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes successPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ============================================
   Therapist Profile — In-chat card (compact)
   ============================================ */

.wa-profile-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 6px;
}

.wa-profile-preview-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wa-profile-preview-info {
  flex: 1;
  min-width: 0;
}

.wa-profile-preview-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--wa-text);
  line-height: 1.3;
}

.wa-profile-preview-designation {
  font-size: 12px;
  color: var(--wa-text-secondary);
  margin-top: 1px;
}

.wa-profile-preview-file {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F0F2F5;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
}

.wa-profile-preview-pdf {
  width: 28px;
  height: 28px;
  fill: #E74C3C;
  flex-shrink: 0;
}

.wa-profile-preview-file-info {
  flex: 1;
  min-width: 0;
}

.wa-profile-preview-file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--wa-text);
}

.wa-profile-preview-file-meta {
  font-size: 11px;
  color: var(--wa-text-secondary);
  margin-top: 1px;
}

.wa-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  max-width: 85%;
  animation: buttonsAppear 300ms ease-out forwards;
  animation-delay: 300ms;
  opacity: 0;
}

/* ============================================
   Therapist Profile — Full-screen overlay
   ============================================ */

.wa-profile-overlay {
  position: absolute;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  background: #F7F7F7;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms, visibility 200ms;
}

.wa-profile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wa-profile-header {
  background: var(--wa-green-header);
  color: var(--wa-header-text);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 0.5px solid #C6C6C8;
}

.wa-profile-header-back {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.wa-profile-header-back svg {
  width: 24px;
  height: 24px;
  fill: var(--wa-button-blue);
}

.wa-profile-header-title {
  font-size: 17px;
  font-weight: 600;
}

.wa-profile-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #F7F7F7;
}

.wa-profile-banner {
  height: 100px;
  background: #FFC727;
  flex-shrink: 0;
}

.wa-profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-top: -48px;
  position: relative;
  z-index: 1;
}

.wa-profile-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  background: white;
}

.wa-profile-name {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--wa-text);
  margin-top: 12px;
}

.wa-profile-designation {
  text-align: center;
  font-size: 14px;
  color: var(--wa-text-secondary);
  margin-top: 2px;
}

.wa-profile-credentials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  padding: 0 16px;
}

.wa-profile-credential {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F0F7F0;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #2D6A2E;
}

.wa-profile-credential svg {
  width: 14px;
  height: 14px;
  fill: #2D6A2E;
}

.wa-profile-bio {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  text-align: center;
}

.wa-profile-section {
  padding: 0 20px 16px;
}

.wa-profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--wa-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.wa-profile-concerns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-profile-concern-pill {
  background: #FFE5E0;
  color: #8B3A2F;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.4;
}

.wa-profile-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wa-profile-issue-tag {
  background: #EAECEF;
  color: #444;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
}

.wa-profile-focus-card {
  background: #FFF8E1;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #5D4E37;
  border-left: 3px solid #FFC727;
}

.wa-profile-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wa-profile-language-badge {
  border: 1px solid #CCC;
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  background: white;
}

/* ============================================
   Mobile Responsive (≤480px: full-screen)
   ============================================ */

@media (max-width: 480px) {
  body.chat-body {
    background: var(--wa-bg);
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }

  .phone-frame::before,
  .phone-frame::after {
    display: none;
  }

  .phone-screen {
    border-radius: 0;
  }

  .wa-status-bar {
    height: 0;
    display: none;
  }

  .wa-header {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--wa-header-height) + env(safe-area-inset-top));
  }

  .wa-input-bar {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
  }

  .wa-list-sheet,
  .wa-flow-modal {
    max-width: 100%;
  }

  .wa-payment-modal {
    max-width: calc(100% - 32px);
  }
}
