/* WhatsApp Mini App - Authentic Design System */

:root {
  /* WhatsApp Dark Theme (Default) */
  --wa-bg: #0b141a;
  --wa-header-bg: #1f2c34;
  --wa-header-text: #e9edef;
  --wa-header-icon: #aebac1;
  --wa-header-icon-hover: #d1d7db;
  --wa-subtext: #8696a0;
  --wa-border: #222d34;
  --wa-incoming-bg: #202c33;
  --wa-incoming-text: #e9edef;
  --wa-outgoing-bg: #005c4b;
  --wa-outgoing-text: #e9edef;
  --wa-input-bg: #2a3942;
  --wa-input-bar-bg: #1f2c34;
  --wa-input-text: #d1d7db;
  --wa-input-placeholder: #8696a0;
  --wa-accent: #00a884;
  --wa-accent-hover: #06cf9c;
  --wa-send-btn-bg: #00a884;
  --wa-send-btn-icon: #ffffff;
  --wa-tick-grey: #8696a0;
  --wa-tick-blue: #53bdeb;
  --wa-badge-bg: #182229;
  --wa-badge-text: #ffd279;
  --wa-date-bg: #182229;
  --wa-date-text: #8696a0;
  --wa-drawer-bg: #111b21;
  --wa-card-bg: #111b21;
  --wa-ripple: rgba(255, 255, 255, 0.1);
  --wa-shadow: rgba(11, 20, 26, 0.25);
  --wa-audio-bar: #8696a0;
  --wa-audio-active: #00a884;
  --wa-record-bg: #ea4335;
}

[data-theme="light"] {
  /* WhatsApp Light Theme */
  --wa-bg: #efeae2;
  --wa-header-bg: #008069;
  --wa-header-text: #ffffff;
  --wa-header-icon: #ffffff;
  --wa-header-icon-hover: #e2f7f1;
  --wa-subtext: #e9edef;
  --wa-border: #dae0e5;
  --wa-incoming-bg: #ffffff;
  --wa-incoming-text: #111b21;
  --wa-outgoing-bg: #d9fdd3;
  --wa-outgoing-text: #111b21;
  --wa-input-bg: #ffffff;
  --wa-input-bar-bg: #f0f2f5;
  --wa-input-text: #111b21;
  --wa-input-placeholder: #667781;
  --wa-accent: #008069;
  --wa-accent-hover: #00a884;
  --wa-send-btn-bg: #008069;
  --wa-send-btn-icon: #ffffff;
  --wa-tick-grey: #667781;
  --wa-tick-blue: #53bdeb;
  --wa-badge-bg: #ffeecd;
  --wa-badge-text: #594411;
  --wa-date-bg: #ffffff;
  --wa-date-text: #54656f;
  --wa-drawer-bg: #ffffff;
  --wa-card-bg: #ffffff;
  --wa-ripple: rgba(0, 0, 0, 0.08);
  --wa-shadow: rgba(0, 0, 0, 0.1);
  --wa-audio-bar: #b1b9be;
  --wa-audio-active: #008069;
  --wa-record-bg: #ea4335;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, [contenteditable] {
  user-select: text;
  -webkit-user-select: text;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--wa-bg);
  color: var(--wa-incoming-text);
}

/* App Container */
.wa-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background-color: var(--wa-bg);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
}

/* WhatsApp Header */
.wa-header {
  height: 60px;
  min-height: 60px;
  background-color: var(--wa-header-bg);
  color: var(--wa-header-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: background-color 0.2s ease;
}

.wa-header-left {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 6px;
  transition: background 0.15s ease;
}

.wa-header-left:hover {
  background: var(--wa-ripple);
}

.wa-back-btn {
  background: none;
  border: none;
  color: var(--wa-header-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  outline: none;
}

.wa-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: #374248;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wa-avatar-initials {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.wa-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background-color: #25d366;
  border: 2px solid var(--wa-header-bg);
  border-radius: 50%;
}

.wa-chat-meta {
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  flex: 1;
}

.wa-chat-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-chat-name {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--wa-header-text);
  line-height: 1.2;
}

.wa-verified-badge {
  display: inline-flex;
  color: #00a884;
  font-size: 14px;
}

[data-theme="light"] .wa-verified-badge {
  color: #ffffff;
}

.wa-chat-status {
  font-size: 12px;
  color: var(--wa-subtext);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-chat-status.typing {
  color: #25d366;
  font-weight: 500;
}

[data-theme="light"] .wa-chat-status.typing {
  color: #e2f7f1;
}

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

.wa-icon-btn {
  background: none;
  border: none;
  color: var(--wa-header-icon);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.wa-icon-btn:hover {
  background: var(--wa-ripple);
  color: var(--wa-header-icon-hover);
}

.wa-icon-btn:active {
  transform: scale(0.94);
}

/* WhatsApp Menu Popup */
.wa-menu-dropdown {
  position: absolute;
  top: 64px;
  right: 12px;
  background-color: var(--wa-card-bg);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  padding: 6px 0;
  min-width: 190px;
  z-index: 200;
  display: none;
  border: 1px solid var(--wa-border);
  animation: fadeInMenu 0.15s ease-out;
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.wa-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--wa-incoming-text);
  cursor: pointer;
  transition: background 0.15s;
}

.wa-menu-item:hover {
  background-color: var(--wa-ripple);
}

.wa-menu-item svg {
  color: var(--wa-tick-grey);
}

.wa-menu-divider {
  height: 1px;
  background-color: var(--wa-border);
  margin: 4px 0;
}

/* Chat Wallpaper / Body */
.wa-chat-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Classic WhatsApp Doodle Background */
.wa-wallpaper-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='360' height='360' viewBox='0 0 360 360' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-rule='evenodd'%3E%3Cpath d='M30 40h20v20H30zm60 40h20v20H90zm180-20h20v20h-20zM30 180h20v20H30zm120-60h20v20h-20zm120 40h20v20h-20zm-60 100h20v20h-20zM60 280h20v20H60zm200 60h20v20h-20zm-80-60h20v20h-20zM170 30a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm100 90a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm-80 140a10 10 0 1 1 0 20 10 10 0 0 1 0-20zM40 120a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm240 140a10 10 0 1 1 0 20 10 10 0 0 1 0-20z' opacity='.6'/%3E%3Cpath d='M15 15l15 15M15 30l15-15m90 195l15 15m-15 0l15-15m150-135l15 15m-15 0l15-15m-45 195l15 15m-15 0l15-15M120 45c5-10 15-10 20 0s15 10 20 0' stroke='%23ffffff' stroke-width='2' fill='none' opacity='.5'/%3E%3Cpath d='M18 318c-3 0-6-3-6-6v-12c0-3 3-6 6-6h18c3 0 6 3 6 6v12c0 3-3 6-6 6zm0-18h18v12H18z' opacity='.5'/%3E%3Ccircle cx='310' cy='310' r='14' stroke='%23ffffff' stroke-width='2' fill='none' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 380px 380px;
  background-repeat: repeat;
}

[data-theme="light"] .wa-wallpaper-overlay {
  opacity: 0.08;
  filter: invert(1);
}

/* Scrollable Messages Feed */
.wa-messages-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
  scroll-behavior: smooth;
}

.wa-messages-feed::-webkit-scrollbar {
  width: 5px;
}

.wa-messages-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Encryption Notice Banner */
.wa-encryption-box {
  align-self: center;
  background-color: var(--wa-badge-bg);
  color: var(--wa-badge-text);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  max-width: 90%;
  text-align: center;
  line-height: 1.4;
  margin: 6px 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.wa-encryption-box svg {
  flex-shrink: 0;
}

/* Date Pill */
.wa-date-pill {
  align-self: center;
  background-color: var(--wa-date-bg);
  color: var(--wa-date-text);
  padding: 5px 12px;
  border-radius: 7.5px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 4px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Message Rows */
.wa-msg-row {
  display: flex;
  width: 100%;
  position: relative;
  animation: waSlideUp 0.18s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes waSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wa-msg-in {
  justify-content: flex-start;
}

.wa-msg-out {
  justify-content: flex-end;
}

/* WhatsApp Message Bubble */
.wa-bubble {
  max-width: 82%;
  min-width: 80px;
  padding: 6px 9px 6px 11px;
  border-radius: 8px;
  position: relative;
  font-size: 14.2px;
  line-height: 1.42;
  box-shadow: 0 1px 1.5px rgba(11, 20, 26, 0.22);
  word-wrap: break-word;
  word-break: break-word;
}

/* WhatsApp Corner Tails */
.wa-msg-in .wa-bubble {
  background-color: var(--wa-incoming-bg);
  color: var(--wa-incoming-text);
  border-top-left-radius: 0;
}

.wa-msg-in .wa-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 0px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 8px solid var(--wa-incoming-bg);
}

.wa-msg-out .wa-bubble {
  background-color: var(--wa-outgoing-bg);
  color: var(--wa-outgoing-text);
  border-top-right-radius: 0;
}

.wa-msg-out .wa-bubble::after {
  content: "";
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 0px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 8px solid var(--wa-outgoing-bg);
}

.wa-msg-text {
  margin-right: 4px;
}

.wa-msg-meta {
  display: inline-flex;
  align-items: center;
  float: right;
  gap: 3px;
  margin-left: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--wa-subtext);
  vertical-align: bottom;
}

.wa-msg-out .wa-msg-meta {
  color: rgba(233, 237, 239, 0.65);
}

[data-theme="light"] .wa-msg-out .wa-msg-meta {
  color: rgba(17, 27, 33, 0.6);
}

/* WhatsApp Blue Ticks */
.wa-ticks {
  display: inline-flex;
  align-items: center;
}

.wa-ticks.blue {
  color: var(--wa-tick-blue);
}

.wa-ticks.grey {
  color: var(--wa-tick-grey);
}

/* Reactions on Message */
.wa-reactions-pill {
  position: absolute;
  bottom: -9px;
  background-color: var(--wa-incoming-bg);
  border: 1px solid var(--wa-border);
  padding: 1px 5px;
  border-radius: 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 5;
}

.wa-msg-out .wa-reactions-pill {
  right: 12px;
}

.wa-msg-in .wa-reactions-pill {
  left: 12px;
}

/* Floating Reaction Picker */
.wa-reaction-bar {
  position: absolute;
  top: -42px;
  background-color: var(--wa-card-bg);
  border: 1px solid var(--wa-border);
  border-radius: 24px;
  padding: 4px 8px;
  display: none;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 50;
  animation: popReaction 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popReaction {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.wa-reaction-bar.visible {
  display: flex;
}

.wa-react-emoji {
  cursor: pointer;
  font-size: 19px;
  padding: 2px 4px;
  border-radius: 50%;
  transition: transform 0.15s;
}

.wa-react-emoji:hover {
  transform: scale(1.35);
}

/* WhatsApp Voice Note Bubble */
.wa-audio-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 4px 2px;
}

.wa-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wa-accent);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s;
}

.wa-play-btn:active {
  transform: scale(0.92);
}

.wa-waveform-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wa-waveform {
  display: flex;
  align-items: center;
  gap: 2.2px;
  height: 24px;
}

.wa-wave-bar {
  width: 2.5px;
  background-color: var(--wa-audio-bar);
  border-radius: 2px;
  transition: height 0.2s ease, background-color 0.2s ease;
}

.wa-wave-bar.active {
  background-color: var(--wa-audio-active);
}

.wa-audio-time {
  font-size: 11px;
  color: var(--wa-subtext);
}

.wa-voice-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.wa-voice-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.wa-voice-mic-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background-color: var(--wa-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 8px;
}

/* Media / Image Bubble */
.wa-media-bubble {
  max-width: 260px;
  border-radius: 8px;
  overflow: hidden;
}

.wa-media-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.wa-media-caption {
  margin-top: 6px;
  font-size: 13.5px;
}

/* WhatsApp Input Footer Bar */
.wa-input-container {
  padding: 6px 8px 10px 8px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background-color: transparent;
  z-index: 30;
  position: relative;
}

.wa-input-pill {
  flex: 1;
  background-color: var(--wa-input-bg);
  border-radius: 24px;
  display: flex;
  align-items: flex-end;
  padding: 4px 10px;
  min-height: 48px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--wa-border);
  transition: border-color 0.2s;
}

.wa-input-pill:focus-within {
  border-color: var(--wa-accent);
}

.wa-input-btn {
  background: none;
  border: none;
  color: var(--wa-tick-grey);
  width: 36px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 2px;
  outline: none;
  transition: color 0.15s, transform 0.1s;
}

.wa-input-btn:hover {
  color: var(--wa-header-icon-hover);
}

.wa-input-btn:active {
  transform: scale(0.9);
}

.wa-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--wa-input-text);
  padding: 10px 14px 10px 8px;
  max-height: 120px;
  min-height: 22px;
  resize: none;
  line-height: 1.4;
}

.wa-textarea::placeholder {
  color: var(--wa-input-placeholder);
}

/* WhatsApp Round Action Button (Mic / Send) */
.wa-action-btn-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  position: relative;
}

.wa-circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--wa-send-btn-bg);
  color: var(--wa-send-btn-icon);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  outline: none;
  transition: background-color 0.15s, transform 0.15s;
}

.wa-circle-btn:hover {
  background-color: var(--wa-accent-hover);
}

.wa-circle-btn:active {
  transform: scale(0.92);
}

/* Voice Recording Bar (Replaces input when recording) */
.wa-recording-overlay {
  position: absolute;
  left: 8px;
  right: 62px;
  bottom: 10px;
  height: 48px;
  background-color: var(--wa-input-bg);
  border-radius: 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--wa-border);
  z-index: 35;
}

.wa-recording-overlay.active {
  display: flex;
  animation: slideInRecord 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
}

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

.wa-rec-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-rec-pulse {
  width: 12px;
  height: 12px;
  background-color: var(--wa-record-bg);
  border-radius: 50%;
  animation: pulseRec 1s infinite;
}

@keyframes pulseRec {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.wa-rec-timer {
  font-size: 14px;
  font-weight: 600;
  color: var(--wa-incoming-text);
  font-variant-numeric: tabular-nums;
}

.wa-rec-cancel {
  background: none;
  border: none;
  color: #ea4335;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* WhatsApp Emoji / Sticker Drawer */
.wa-emoji-drawer {
  background-color: var(--wa-card-bg);
  border-top: 1px solid var(--wa-border);
  height: 240px;
  display: none;
  flex-direction: column;
  z-index: 40;
}

.wa-emoji-tabs {
  display: flex;
  border-bottom: 1px solid var(--wa-border);
  padding: 0 8px;
  background-color: var(--wa-header-bg);
}

.wa-emoji-tab {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--wa-tick-grey);
}

.wa-emoji-tab.active {
  border-bottom-color: var(--wa-accent);
  color: var(--wa-accent);
}

.wa-emoji-grid {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  font-size: 24px;
}

.wa-emoji-grid span {
  cursor: pointer;
  text-align: center;
  transition: transform 0.1s;
  padding: 4px;
  border-radius: 6px;
}

.wa-emoji-grid span:hover {
  transform: scale(1.25);
  background-color: var(--wa-ripple);
}

/* Contact Info Modal (WhatsApp Style) */
.wa-contact-modal {
  position: absolute;
  inset: 0;
  background-color: var(--wa-bg);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  animation: slideInContact 0.22s cubic-bezier(0.1, 0.9, 0.2, 1);
}

@keyframes slideInContact {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.wa-contact-top-bar {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-contact-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  background-color: var(--wa-header-bg);
  margin-bottom: 10px;
}

.wa-contact-big-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--wa-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.wa-contact-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--wa-header-text);
  margin-bottom: 4px;
}

.wa-contact-subtitle {
  font-size: 13.5px;
  color: var(--wa-subtext);
}

.wa-contact-section {
  background-color: var(--wa-card-bg);
  padding: 14px 18px;
  margin-bottom: 10px;
}

.wa-contact-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--wa-accent);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.wa-contact-bio {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--wa-incoming-text);
}

.wa-contact-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--wa-border);
}

.wa-contact-action-row:last-child {
  border-bottom: none;
}

/* Toast Banner */
.wa-toast-banner {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--wa-card-bg);
  color: var(--wa-incoming-text);
  border: 1px solid var(--wa-border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 250;
  animation: toastFade 0.2s ease;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================
   Welcome / Landing Screen Styles
   ========================================================== */
.landing-screen {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 56px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(circle at 50% 30%, #17242c 0%, var(--wa-bg) 85%);
  transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.32s;
  overflow: hidden;
}

.landing-screen.landing-hidden {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  visibility: hidden;
}

.landing-decor-blur {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 168, 132, 0.18) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.landing-main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
  z-index: 2;
}

.landing-avatar-container {
  position: relative;
  width: 144px;
  height: 144px;
  margin-bottom: 22px;
}

.landing-avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 168, 132, 0.6) 0%, rgba(83, 189, 235, 0.35) 100%);
  filter: blur(12px);
  opacity: 0.75;
  animation: pulseAvatar 3s ease-in-out infinite alternate;
}

@keyframes pulseAvatar {
  from { transform: scale(0.98); opacity: 0.55; }
  to { transform: scale(1.04); opacity: 0.85; }
}

.landing-avatar-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3.5px solid var(--wa-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.landing-status-badge {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: rgba(17, 27, 33, 0.92);
  border: 1px solid var(--wa-border);
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.landing-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.landing-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.landing-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--wa-header-text);
  letter-spacing: -0.3px;
}

.landing-verified-badge {
  color: var(--wa-accent);
  display: flex;
  align-items: center;
}

.landing-tagline {
  color: var(--wa-subtext);
  font-size: 14px;
  line-height: 1.55;
  max-width: 310px;
}

/* Landing Actions & Links */
.landing-footer-actions {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 2;
}

.landing-start-chat-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #00a884 0%, #00876b 100%);
  color: #ffffff;
  border: none;
  border-radius: 26px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 168, 132, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landing-start-chat-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(0, 168, 132, 0.25);
}

.landing-start-chat-btn svg {
  transition: transform 0.2s ease;
}

.landing-start-chat-btn:hover svg {
  transform: translateX(3px);
}

.landing-legal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.landing-legal-link {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--wa-subtext);
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.landing-legal-link:hover {
  color: var(--wa-accent);
}

.landing-legal-divider {
  font-size: 11px;
  color: var(--wa-border);
  user-select: none;
}

/* ==========================================================
   Legal Policy Modal Sheet Styles
   ========================================================== */
.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.legal-modal-backdrop.modal-active {
  opacity: 1;
  pointer-events: auto;
}

.legal-modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  background-color: var(--wa-card-bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: 1px solid var(--wa-border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-modal-backdrop.modal-active .legal-modal-sheet {
  transform: translateY(0);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--wa-border);
}

.legal-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wa-header-text);
}

.legal-modal-close-btn {
  background: none;
  border: none;
  color: var(--wa-header-icon);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-modal-close-btn:hover {
  color: var(--wa-header-text);
  background-color: var(--wa-ripple);
}

.legal-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--wa-incoming-text);
}

.legal-modal-body h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--wa-accent);
  margin-top: 12px;
  margin-bottom: 4px;
}

.legal-modal-body p {
  color: var(--wa-subtext);
  margin-bottom: 12px;
}

