/* Phone kit: an iPhone 16 Pro (393×852 logical screen) running WhatsApp iOS
 * in dark mode. Every size below is in logical iPhone points; phone.js scales
 * the whole device to fit its wrapper (.phone-fit) with one transform.
 * Markup patterns and the JS helpers are documented in design/PHONE-KIT.md.
 *
 *   .phone-fit[data-fit]      wrapper that takes the space the layout gives it
 *     .phone                  the device (frame + screen), scaled by phone.js
 *       .phone-screen         the glass: status bar, Dynamic Island, views
 *         .wa-chat | .wa-list | .ios-lock | .ios-banner
 */

.phone {
  /* WhatsApp iOS dark palette (BUILD.md) */
  --wa-bg: #0B141A;
  --wa-bar: rgba(31, 44, 52, .94);       /* #1F2C34, iOS translucent */
  --wa-in: #1F2C34;
  --wa-out: #005C4B;
  --wa-text: #E9EDEF;
  --wa-meta: #8696A0;
  --wa-blue: #53BDEB;                    /* read ticks, unplayed voice */
  --wa-green: #25D366;                   /* unread badge, unread time */
  --wa-send: #00A884;                    /* send button */
  --wa-pill: #182229;                    /* date pills */
  --wa-field: #2A3942;                   /* composer input */
  --wa-hair: rgba(134, 150, 160, .18);
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  /* device geometry */
  --pw: 393px;                           /* screen width */
  --ph: 852px;                           /* screen height (phone.js lowers it in crop mode) */
  --bz: 17px;                            /* titanium band + black bezel, per side */
  --radius: 72px;                        /* outer corner */
  --screen-radius: 55px;
  --status-h: 54px;
  --head-h: 52px;                        /* WhatsApp nav bar under the status bar */
  --safe-b: 30px;                        /* home-indicator safe area */

  position: absolute; left: 50%; top: 50%;
  width: calc(var(--pw) + 2 * var(--bz));
  height: calc(var(--ph) + 2 * var(--bz));
  transform: translate(-50%, -50%) scale(var(--phone-scale, .62));
  border-radius: var(--radius);
  font-family: var(--ios-font);
  color: var(--wa-text);
  text-align: left;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.phone-fit { position: relative; width: 100%; height: 100%; min-height: 0; }

/* ---- device: titanium band and black bezel (on .phone itself, so they show
 * without JS too); side buttons live in the injected .phone-frame ---------- */
.phone {
  background:
    linear-gradient(160deg, #8a8781 0%, #3a3937 14%, #5c5a56 34%, #2a2a29 56%, #4d4b48 78%, #93908a 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .28),
    inset 0 0 0 2px rgba(0, 0, 0, .35),
    0 0 0 1px rgba(0, 0, 0, .55),
    0 50px 90px -30px rgba(0, 0, 0, .85),
    0 24px 40px -24px rgba(0, 0, 0, .6);
}
.phone::before {                     /* the black glass border around the screen */
  content: ""; position: absolute; inset: 4.5px; border-radius: calc(var(--radius) - 4.5px);
  background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), inset 0 0 6px rgba(0, 0, 0, .9);
}
.phone-frame { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.phone-btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #2b2a28, #77746e 60%, #3a3937); }
.phone-btn.b-action { left: -3px; top: 168px; height: 34px; }
.phone-btn.b-volup  { left: -3px; top: 230px; height: 62px; }
.phone-btn.b-voldn  { left: -3px; top: 306px; height: 62px; }
.phone-btn.b-power  { right: -3px; top: 260px; height: 100px; background: linear-gradient(270deg, #2b2a28, #77746e 60%, #3a3937); }
.phone-btn.b-camctl { right: -2px; top: 520px; height: 64px; width: 3px; background: linear-gradient(270deg, #1a1a1a, #4a4a4a); }

.phone-screen {
  position: absolute; inset: var(--bz); overflow: hidden; isolation: isolate;
  border-radius: var(--screen-radius); background: var(--wa-bg);
  font-size: 16.5px;
}
.phone-screen::after {               /* faint glass sheen */
  content: ""; position: absolute; inset: 0; z-index: 40; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .055) 0%, rgba(255, 255, 255, 0) 32%);
}

/* crop mode (phone.js): on short stages the device keeps a readable scale and
 * its lower edge dissolves into the page instead of shrinking the text. */
.phone.is-cropped { height: calc(var(--ph) + var(--bz)); border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 46px), transparent);
          mask-image: linear-gradient(#000 calc(100% - 46px), transparent); }
.phone.is-cropped::before { bottom: -10px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.phone.is-cropped .phone-screen { bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.phone.is-cropped .ios-home { display: none; }

/* ---- iOS chrome: status bar, Dynamic Island, home indicator ---------- */
.ios-island {
  position: absolute; z-index: 31; top: 11px; left: 50%; width: 126px; height: 37px; margin-left: -63px;
  border-radius: 20px; background: #000;
}
.ios-island::after {                 /* front camera glint */
  content: ""; position: absolute; right: 18px; top: 13px; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #1d2a3d 0 30%, #0a0d14 60%);
}
.ios-status {
  position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: var(--status-h);
  display: flex; align-items: center; justify-content: space-between; padding: 4px 0 0;
  color: #fff; pointer-events: none;
}
.ios-time { width: 133px; padding-right: 22px; text-align: center; font: 600 17px/1 var(--ios-font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ios-time.is-tick { animation: ios-tick .5s var(--ease-expo, ease-out); }
@keyframes ios-tick { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.ios-icons { width: 133px; padding-left: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ios-icons svg { display: block; fill: currentColor; }
.ios-home {
  position: absolute; z-index: 30; bottom: 8px; left: 50%; width: 136px; height: 5px; margin-left: -68px;
  border-radius: 3px; background: #fff; pointer-events: none;
}
/* the lock screen shows its own big clock, so the status bar time hides */
.phone-screen:has(.ios-lock.is-on) .ios-time { visibility: hidden; }

/* ---- icons: one mask each, coloured by currentColor -------------------- */
.ico {
  display: inline-block; flex: none; width: 24px; height: 24px; background: currentColor; font-style: normal;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.ico-back   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 3.5 7 12l8.5 8.5' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-video  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='1.8' y='6' width='14.2' height='12' rx='3'/%3E%3Cpath d='M16 10.3 21.6 7v10L16 13.7z'/%3E%3C/svg%3E"); }
.ico-call   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.2 3.4c.6-.4 1.3-.3 1.7.3l1.9 2.7c.4.6.3 1.3-.2 1.7l-1.3 1c-.3.3-.4.7-.2 1.1.9 1.9 2.5 3.5 4.4 4.4.4.2.8.1 1.1-.2l1-1.3c.4-.5 1.2-.6 1.7-.2l2.7 1.9c.6.4.7 1.1.3 1.7l-1.2 1.7c-.6.9-1.8 1.4-2.9 1.1-5.7-1.5-10.2-6-11.7-11.7-.3-1.1.2-2.3 1.1-2.9z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-plus   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5v17M3.5 12h17' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico-cam    { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 8.6A2.6 2.6 0 0 1 5.6 6h2l1.5-2.2h5.8L16.4 6h2A2.6 2.6 0 0 1 21 8.6v8.8a2.6 2.6 0 0 1-2.6 2.6H5.6A2.6 2.6 0 0 1 3 17.4z'/%3E%3Ccircle cx='12' cy='12.6' r='3.9'/%3E%3C/svg%3E"); }
.ico-mic    { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='8.6' y='2.6' width='6.8' height='12' rx='3.4'/%3E%3Cpath d='M5.2 11a6.8 6.8 0 0 0 13.6 0M12 17.8v3.4'/%3E%3C/svg%3E"); }
.ico-micf   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='8' y='2' width='8' height='13' rx='4'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico-send   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20.2 21 12 4 3.8l.1 6.5L15 12 4.1 13.7z'/%3E%3C/svg%3E"); }
.ico-sticker{ --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M20 12.6V7.4A3.4 3.4 0 0 0 16.6 4H7.4A3.4 3.4 0 0 0 4 7.4v9.2A3.4 3.4 0 0 0 7.4 20h5.2z'/%3E%3Cpath d='M12.6 20v-3.9a3.5 3.5 0 0 1 3.5-3.5H20'/%3E%3C/svg%3E"); }
.ico-tick1  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M3.6 6.6 7 10l7-7.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-tick2  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M1.2 6.6 4.6 10l7-7.8M8.3 9.5l.5.5 7-7.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-play   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3.8c0-.8.9-1.3 1.6-.9l12 7.3c.7.4.7 1.4 0 1.8l-12 7.3c-.7.4-1.6-.1-1.6-.9z'/%3E%3C/svg%3E"); }
.ico-pause  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5.5' y='4' width='4.6' height='16' rx='1.4'/%3E%3Crect x='13.9' y='4' width='4.6' height='16' rx='1.4'/%3E%3C/svg%3E"); }
.ico-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E"); }
.ico-more   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E"); }
.ico-lock   { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10.4' width='14' height='10.6' rx='2.6'/%3E%3Cpath d='M8.2 10.4V8a3.8 3.8 0 0 1 7.6 0v2.4' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.ico-torch  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M7.5 2.5h9v3.2L14.4 9v12.5H9.6V9L7.5 5.7z'/%3E%3Cpath d='M7.5 5.7h9'/%3E%3Ccircle cx='12' cy='13.5' r='1.1' fill='black' stroke='none'/%3E%3C/svg%3E"); }
.ico-house  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11.2 12 3.8l9 7.4V21h-6.2v-6.2H9.2V21H3z'/%3E%3C/svg%3E"); }
.ico-reply  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 5.5 4 11l5.5 5.5'/%3E%3Cpath d='M4.6 11H14a6 6 0 0 1 6 6v1.5'/%3E%3C/svg%3E"); }

/* ---- avatars ------------------------------------------------------------ */
.wa-av { display: block; flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #33434c; }
/* WhatsApp's grey default-person avatar, for contacts without a photo */
.wa-av--default {
  background: #5d6c76 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='15.4' r='7.2' fill='%23C9D1D6'/%3E%3Cpath d='M5.5 37.5C7 29.6 12.8 25.6 20 25.6s13 4 14.5 11.9' fill='%23C9D1D6'/%3E%3C/svg%3E") center / cover no-repeat;
}
/* the company's own profile picture (Residencial Horizonte, fictional) */
.wa-av--brand {
  background: #0f3a33 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M10.5 24.5a9.5 9.5 0 0 1 19 0z' fill='%23E9EDE0'/%3E%3Cpath d='M7.5 27.6h25' stroke='%23E9EDE0' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M11.5 31h17' stroke='%23E9EDE0' stroke-width='1.8' stroke-linecap='round' opacity='.5'/%3E%3C/svg%3E") center / cover no-repeat;
}

/* ---- views: chat, chat list, lock screen share the screen ------------- */
.wa-view {
  position: absolute; inset: 0; background: var(--wa-bg);
  transition: transform .55s var(--ease-expo, ease-out), opacity .4s var(--ease, ease), visibility 0s linear 0s;
}
.wa-view.is-away  { transform: translateX(100%); visibility: hidden; transition-property: transform, opacity, visibility; transition-delay: 0s, 0s, .55s; }
.wa-view.is-under { transform: translateX(-28%); opacity: .55; visibility: hidden; transition-delay: 0s, 0s, .55s; }

/* ---- WhatsApp chat ------------------------------------------------------ */
/* header overlays the top (translucent); body fills the rest; the composer sits
 * in flow at the bottom, so a growing draft lifts the conversation with it */
.wa-chat { display: flex; flex-direction: column; }
.wa-chat::before {                   /* doodle wallpaper, ~6% over #0B141A */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("img/wa-doodles.webp") 0 0 / 430px repeat; opacity: .06;
}
.wa-head {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  height: calc(var(--status-h) + var(--head-h)); padding: var(--status-h) 14px 0 6px;
  display: flex; align-items: center; gap: 8px;
  background: var(--wa-bar); border-bottom: .5px solid var(--wa-hair);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
}
.wa-head > .ico-back { width: 26px; height: 26px; margin-right: -2px; color: var(--wa-text); }
.wa-head .wa-av { width: 37px; height: 37px; }
.wa-head-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding-left: 2px; }
.wa-head-name { font: 600 16.5px/1.15 var(--ios-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-head-sub { position: relative; height: 15px; font: 400 12.5px/15px var(--ios-font); color: var(--wa-meta); white-space: nowrap; }
.wa-head-sub > span { position: absolute; left: 0; top: 0; transition: opacity .25s var(--ease, ease); }
/* which sub-status shows: data-sub on .wa-head = "online" | "typing" | "" (none) */
.wa-head-sub > span { opacity: 0; }
.wa-head[data-sub="online"] .wa-sub-online,
.wa-head[data-sub="typing"] .wa-sub-typing,
.wa-head[data-sub="business"] .wa-sub-business { opacity: 1; }
.wa-head:not([data-sub="online"]):not([data-sub="typing"]):not([data-sub="business"]) .wa-head-sub { height: 0; }
.wa-head-icons { display: flex; align-items: center; gap: 22px; color: var(--wa-text); }
.wa-head-icons .ico { width: 25px; height: 25px; }

.wa-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
/* messages stack from the bottom up, like a real chat: new ones push old ones out of the top */
.wa-stack {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: stretch;
  padding: calc(var(--status-h) + var(--head-h) + 10px) 12px 10px;
  isolation: isolate;   /* same stacking as before, without a permanent GPU layer (was will-change: transform) */
}
.wa-body:last-child .wa-stack { padding-bottom: calc(var(--safe-b) + 10px); }   /* a chat without composer */
/* no JS or reduced motion: the whole conversation is readable by scrolling the screen */
html:not(.js) .wa-body, .rm .wa-body { overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; }
html:not(.js) .wa-stack, .rm .wa-stack { position: relative; margin-top: auto; }

/* content that appears at a beat: hidden under .js until it has .is-on */
.js .phone [data-step]:not(.is-on) { display: none !important; }

/* date pill and system pill */
.wa-date {
  align-self: center; margin: 10px 0 6px; padding: 5px 12px; border-radius: 9px;
  background: var(--wa-pill); color: var(--wa-meta); font: 500 12.5px/1.2 var(--ios-font); letter-spacing: 0;
  box-shadow: 0 1px .5px rgba(0, 0, 0, .25);
}
.wa-sys {
  align-self: center; max-width: 86%; margin: 8px 0; padding: 6px 12px; border-radius: 9px; text-align: center;
  background: var(--wa-pill); color: #FFD279; font: 400 12.5px/1.35 var(--ios-font);
}

/* message bubbles. .in = incoming (left), .out = outgoing (right).
 * .tail = last bubble of its group (iOS WhatsApp draws the tail at the bottom).
 * .cont = follows a bubble from the same side (tighter gap). */
.wa-msg {
  position: relative; align-self: flex-start; max-width: 80%; margin-top: 8px;
  padding: 6px 9px 7px 10px; border-radius: 17px;
  background: var(--wa-in); color: var(--wa-text);
  font: 400 16.5px/1.32 var(--ios-font); letter-spacing: -.012em;
  box-shadow: 0 1px .5px rgba(0, 0, 0, .22);
  overflow-wrap: break-word;
}
.wa-msg.out { align-self: flex-end; background: var(--wa-out); }
.wa-msg.cont { margin-top: 2px; }
.wa-msg.tail.in  { border-bottom-left-radius: 5px; }
.wa-msg.tail.out { border-bottom-right-radius: 5px; }
.wa-msg.tail::after {
  content: ""; position: absolute; bottom: 0; width: 16px; height: 18px; background: inherit;
  clip-path: path("M5 0H16V18H2.4C1.4 18 .6 17.8 0 17.4 3.5 15.4 5 12.4 5 8.4Z");
}
.wa-msg.tail.in::after  { left: -5px; }
.wa-msg.tail.out::after { right: -5px; transform: scaleX(-1); }
.wa-text { display: flow-root; margin: 0; }
.wa-text b { font-weight: 600; }
.wa-link { color: var(--wa-blue); text-decoration: none; }

/* time + ticks, floated so short last lines keep it on the same line */
.wa-meta {
  float: right; position: relative; top: 7px; margin: 0 -2px 0 10px;
  display: inline-flex; align-items: center; gap: 3px;
  font: 400 11.5px/1 var(--ios-font); letter-spacing: 0; color: var(--wa-meta); white-space: nowrap;
}
.wa-msg.out .wa-meta { color: rgba(233, 237, 239, .62); }
.wa-meta .ico { width: 17px; height: 11px; color: rgba(233, 237, 239, .62); transition: color .3s var(--ease, ease); }
.wa-msg.in .wa-meta .ico { display: none; }
/* tick state on the bubble: data-tick = "sent" (one grey) | "delivered" (two grey) | "read" (two blue) */
.wa-msg[data-tick="read"] .wa-meta .ico { color: var(--wa-blue); }
.wa-msg[data-tick="sent"] .wa-meta .ico-tick2 {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M3.6 6.6 7 10l7-7.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12'%3E%3Cpath d='M3.6 6.6 7 10l7-7.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* a quoted message inside a bubble (a reply, or a pressed template button) */
.wa-quote {
  display: block; margin: -2px -5px 6px -6px; padding: 6px 10px 7px; border-radius: 8px;
  border-left: 4px solid #06CF9C; background: rgba(0, 0, 0, .22);
  font: 400 14px/1.3 var(--ios-font); color: rgba(233, 237, 239, .7);
}
.wa-quote b { display: block; color: #06CF9C; font-weight: 600; font-size: 13.5px; margin-bottom: 1px; }

/* bubble entrance (added by Kima.phone.show when not instant) */
.wa-msg.is-enter, .wa-date.is-enter, .wa-sys.is-enter, .wa-tpl.is-enter { animation: wa-in .42s var(--ease-expo, ease-out) both; }
.wa-msg.in.is-enter  { transform-origin: 0 100%; }
.wa-msg.out.is-enter { transform-origin: 100% 100%; }
@keyframes wa-in { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
.wa-annot.is-enter, .wa-chip.is-enter { animation: wa-annot-in .55s var(--ease-expo, ease-out) both; }
@keyframes wa-annot-in { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }

/* ---- voice note --------------------------------------------------------- */
/* --p (0..1) is the playback position, set by Kima.phone.voice(el, p). */
.wa-voice { width: 292px; max-width: 82%; padding: 9px 10px 6px 8px; --wave-w: 168px; }
.wa-voice-row { display: flex; align-items: center; gap: 8px; }
.wa-play { flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: #D1D7DB; }
.wa-play .ico { width: 22px; height: 22px; }
.wa-play .ico-pause { display: none; }
.wa-voice.is-playing .wa-play .ico-play { display: none; }
.wa-voice.is-playing .wa-play .ico-pause { display: inline-block; }
.wa-wave { position: relative; flex: 0 0 var(--wave-w); height: 30px; }
.wa-wave-base, .wa-wave-fill { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; }
.wa-wave i { display: block; width: 3px; height: var(--h, 8px); border-radius: 2px; background: currentColor; }
.wa-wave-base { color: rgba(233, 237, 239, .34); }
.wa-msg.out .wa-wave-base { color: rgba(233, 237, 239, .42); }
.wa-wave-fill { color: #DDE3E6; clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0); }
.wa-msg.in.wa-voice:not(.is-played) .wa-wave-fill { color: var(--wa-blue); }
.wa-knob {
  position: absolute; left: 0; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: #DDE3E6; transform: translateX(calc(var(--p, 0) * var(--wave-w)));
}
.wa-msg.in.wa-voice:not(.is-played) .wa-knob { background: var(--wa-blue); }
.wa-voice-av { position: relative; flex: none; width: 46px; height: 46px; margin-left: auto; }
.wa-voice-av .wa-av { width: 46px; height: 46px; }
.wa-voice-av .wa-mic {
  position: absolute; left: -5px; bottom: -2px; width: 19px; height: 19px; color: var(--wa-blue);
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .9));
}
.wa-voice.is-played .wa-voice-av .wa-mic { color: var(--wa-meta); }
.wa-msg.out.wa-voice .wa-voice-av .wa-mic { color: var(--wa-meta); }
.wa-msg.out.wa-voice[data-tick="read"] .wa-voice-av .wa-mic { color: var(--wa-blue); }
/* while it plays, the avatar turns into the playback-speed pill */
.wa-speed { display: none; position: absolute; inset: 9px 3px; border-radius: 14px; background: rgba(233, 237, 239, .16);
  font: 600 13.5px/28px var(--ios-font); text-align: center; color: var(--wa-text); }
.wa-voice.is-playing .wa-speed { display: block; }
.wa-voice.is-playing .wa-voice-av .wa-av, .wa-voice.is-playing .wa-voice-av .wa-mic { visibility: hidden; }
.wa-voice-foot { display: flex; align-items: flex-end; justify-content: space-between; min-height: 15px; padding-left: 38px; margin-top: 1px; }
.wa-dur { font: 400 11.5px/1 var(--ios-font); color: var(--wa-meta); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.wa-msg.out .wa-dur { color: rgba(233, 237, 239, .62); }
.wa-voice-foot .wa-meta { float: none; top: 0; margin: 0; }
/* a voice note's transcript, inside the bubble under the waveform */
.wa-transcript {
  margin: 9px 2px 2px; padding-top: 9px; border-top: .5px solid rgba(233, 237, 239, .14);
  font: 400 15.5px/1.38 var(--ios-font); letter-spacing: -.01em; color: var(--wa-text);
}
/* words written by a scrub: Kima.phone.words() wraps them, Kima.phone.write() sets --n */
.wa-w { opacity: clamp(0, calc(var(--n, 100000) - var(--i)), 1); }
/* .wa-grow: cut to the lines written so far (Kima.phone.write sets --grow-h) */
.js .wa-grow { max-height: var(--grow-h, 3em); overflow: hidden; transition: max-height .35s var(--ease-expo, ease-out); }

/* ---- Kima annotations inside the chat (lime tags and the chip) --------- */
/* These are Kima's labels, not WhatsApp UI: they sit between bubbles. */
.wa-annot { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 2px 2px; }
.wa-annot.out { justify-content: flex-end; }
.phone .tag { font-size: 12.5px; padding: 5px 10px; border-radius: 7px; gap: 7px; letter-spacing: .06em; background: rgba(20, 26, 5, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.js .wa-annot .tag.is-off { opacity: 0; transform: translateY(4px); visibility: hidden; }
.wa-annot .tag { transition: opacity .45s var(--ease-expo, ease-out), transform .45s var(--ease-expo, ease-out), visibility 0s; }
.wa-chip { display: flex; margin: 10px 2px 2px; }
.wa-chip.out { justify-content: flex-end; }
.phone .chip { font-size: 15px; padding: 8px 15px 8px 12px; gap: 9px; }
.phone .chip .chip-dot { width: 8px; height: 8px; }
.phone .chip.is-docked { font-size: 12.5px; padding: 4px 10px 4px 8px; gap: 6px; box-shadow: none; }   /* small chip in a list row */
.phone .chip.is-docked .chip-dot { width: 6px; height: 6px; }

/* ---- template (notice) bubble with interactive buttons ------------------ */
.wa-tpl { display: flex; flex-direction: column; align-self: flex-start; width: 80%; margin-top: 8px; }
.wa-tpl.out { align-self: flex-end; }
.wa-tpl > .wa-msg { max-width: none; margin-top: 0; align-self: stretch; }
.wa-btns { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--wa-in); color: var(--wa-blue); font: 500 15.5px/1 var(--ios-font); letter-spacing: 0;
  box-shadow: 0 1px .5px rgba(0, 0, 0, .22); transition: background-color .25s var(--ease, ease), transform .25s var(--ease, ease);
}
.wa-tpl.out .wa-btn { background: var(--wa-out); }
.wa-btn .ico { width: 18px; height: 18px; }
.wa-btn.is-pressed { background: #2c3e49; transform: scale(.97); }
.wa-btn.is-chosen { color: var(--wa-meta); }

/* ---- composer ----------------------------------------------------------- */
.wa-compose {
  position: relative; z-index: 5; flex: none;
  padding: 7px 12px calc(var(--safe-b) + 6px); display: flex; align-items: flex-end; gap: 12px;
  background: var(--wa-bar); border-top: .5px solid var(--wa-hair);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  color: var(--wa-text);
}
.wa-compose > .ico { width: 26px; height: 26px; margin-bottom: 6px; }
.wa-compose > .ico-plus { width: 25px; height: 25px; }
.wa-field {
  position: relative; flex: 1; min-width: 0; min-height: 38px; max-height: 150px; overflow: hidden;
  padding: 8px 40px 8px 14px; border-radius: 19px; background: var(--wa-field);
  border: .5px solid rgba(134, 150, 160, .14);
  font: 400 16.5px/1.3 var(--ios-font); color: var(--wa-text); overflow-wrap: break-word;
}
.wa-field > .ico-sticker { position: absolute; right: 10px; bottom: 7px; width: 23px; height: 23px; color: var(--wa-meta); }
.wa-draft { white-space: pre-wrap; }
/* the caret blinks only while the field is focused (.is-focus on .wa-compose) */
.wa-caret { display: none; width: 2px; height: 1.2em; margin: 0 0 -.22em 1px; border-radius: 1px; background: #00A884; vertical-align: baseline; }
.wa-compose.is-focus .wa-caret { display: inline-block; animation: wa-blink 1.05s steps(1) infinite; }
@keyframes wa-blink { 50% { opacity: 0; } }
.wa-compose:has(.wa-sel) .wa-caret { display: none; }   /* iOS hides the caret while text is selected */
/* blue iOS text selection with its two handles */
.wa-sel { position: relative; background: rgba(10, 132, 255, .42); border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.wa-sel::before, .wa-sel::after { content: ""; position: absolute; width: 2px; background: #0A84FF; top: -.1em; bottom: -.1em; }
.wa-sel::before { left: -1px; }
.wa-sel::after { right: -1px; }
.wa-sel > .wa-handle-a, .wa-sel > .wa-handle-b { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #0A84FF; }
.wa-sel > .wa-handle-a { left: -5px; top: -.55em; }
.wa-sel > .wa-handle-b { right: -5px; bottom: -.55em; }
.wa-sel.is-cut { opacity: 0; transition: opacity .18s ease; }
/* with text, the camera hides and the mic becomes the green send button */
.wa-send { display: none; width: 36px; height: 36px; margin-bottom: 1px; border-radius: 50%; background: var(--wa-send); color: #0B141A; place-items: center; }
.wa-send .ico { width: 19px; height: 19px; margin-left: 2px; }
.wa-compose.has-text > .ico-cam, .wa-compose.has-text > .ico-mic { display: none; }
.wa-compose.has-text .wa-send { display: grid; }

/* ---- chat list (Conversas) --------------------------------------------- */
.wa-list { overflow: hidden; }
.wa-list-top { position: relative; z-index: 2; padding: calc(var(--status-h) + 2px) 16px 0; background: var(--wa-bg); }
.wa-list-bar { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.wa-round { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #233138; color: var(--wa-text); }
.wa-round .ico { width: 19px; height: 19px; }
.wa-round.is-green { background: var(--wa-green); color: #0B141A; }
.wa-list-actions { display: flex; align-items: center; gap: 16px; color: var(--wa-text); }
.wa-list-actions > .ico { width: 25px; height: 25px; }
.wa-list-title { margin: 4px 0 0; font: 700 33px/1.12 var(--ios-font); letter-spacing: -.025em; color: #fff; }
.wa-list-title--sm { font-size: 25px; line-height: 1.15; }   /* for long titles, so they stay on one line */
.wa-list-acct { display: flex; align-items: center; gap: 6px; margin-top: 2px; font: 500 13px/1.3 var(--ios-font); color: var(--wa-meta); letter-spacing: 0; }
.wa-list-acct .wa-av { width: 18px; height: 18px; }
.wa-search {
  display: flex; align-items: center; gap: 6px; height: 36px; margin: 10px 0 6px; padding: 0 10px; border-radius: 11px;
  background: #1F2C34; color: var(--wa-meta);
}
.wa-search .ico { width: 17px; height: 17px; }
.wa-rows { margin: 0; padding: 0; list-style: none; }
.wa-row { position: relative; display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 16px; }
.wa-row + .wa-row::before { content: ""; position: absolute; top: 0; left: 80px; right: 0; height: .5px; background: var(--wa-hair); }
.wa-row > .wa-av { width: 52px; height: 52px; }
.wa-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.wa-row-top, .wa-row-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.wa-row-name { font: 600 16.5px/1.25 var(--ios-font); color: var(--wa-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-row-time { flex: none; font: 400 13.5px/1.2 var(--ios-font); color: var(--wa-meta); letter-spacing: 0; }
.wa-row-time.is-unread { color: var(--wa-green); }
.wa-row-prev { display: flex; align-items: center; gap: 3px; min-width: 0; font: 400 15px/1.3 var(--ios-font); color: var(--wa-meta); }
.wa-row-prev > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-row-prev .ico { width: 16px; height: 16px; }
.wa-row-prev .ico-micf.is-new { color: var(--wa-blue); }
.wa-row-prev .ico-tick2 { width: 18px; height: 12px; }
.wa-row-prev .ico-tick2.is-read { color: var(--wa-blue); }
.wa-row-prev em { font-style: normal; color: var(--wa-green); }   /* "digitando…" in a row */
.wa-badge {
  flex: none; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px;
  background: var(--wa-green); color: #0B141A; font: 600 13px/21px var(--ios-font); text-align: center; letter-spacing: 0;
}

/* ---- iOS notification banner ------------------------------------------- */
.ios-banner {
  position: absolute; z-index: 35; top: 50px; left: 9px; right: 9px;
  display: flex; align-items: center; gap: 11px; padding: 12px 14px 12px 12px; border-radius: 24px;
  background: rgba(44, 44, 46, .78); color: #fff;
  -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 0 .5px rgba(255, 255, 255, .08);
  transform: translateY(-150%); opacity: 0; visibility: hidden;
  transition: transform .62s cubic-bezier(.2, 1.25, .35, 1), opacity .3s ease, visibility 0s linear .62s;
}
.ios-banner.is-on { transform: none; opacity: 1; visibility: visible; transition: transform .62s cubic-bezier(.2, 1.25, .35, 1), opacity .25s ease, visibility 0s; }
.ios-banner-icon { position: relative; flex: none; width: 40px; height: 40px; }
.ios-banner-icon .wa-av { width: 40px; height: 40px; }
.ios-app-wa {                       /* the app's badge on a communication notification */
  position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 5px;
  background: #25D366; box-shadow: 0 0 0 1.5px rgba(44, 44, 46, 1);
}
.ios-app-wa::after {
  content: ""; position: absolute; inset: 3px; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6a9.3 9.3 0 0 0-8 14l-1.3 4.8 4.9-1.3A9.3 9.3 0 1 0 12 2.6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6a9.3 9.3 0 0 0-8 14l-1.3 4.8 4.9-1.3A9.3 9.3 0 1 0 12 2.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ios-banner-txt { flex: 1; min-width: 0; }
.ios-banner-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ios-banner-top b { font: 600 15px/1.25 var(--ios-font); letter-spacing: -.01em; }
.ios-banner-top time { flex: none; font: 400 13px/1 var(--ios-font); color: rgba(235, 235, 245, .55); }
.ios-banner-txt p { margin: 1px 0 0; font: 400 15px/1.3 var(--ios-font); letter-spacing: -.01em; color: rgba(255, 255, 255, .92); }

/* ---- iOS lock screen ---------------------------------------------------- */
.ios-lock {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center;
  padding-top: 62px; color: #fff; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 108%, rgba(205, 245, 70, .14), transparent 60%),
    radial-gradient(90% 60% at 10% 0%, #22302a, transparent 70%),
    linear-gradient(180deg, #121a17 0%, #0b100e 55%, #070a08 100%);
  opacity: 0; visibility: hidden; transform: scale(1.04);
  transition: opacity .5s var(--ease, ease), transform .7s var(--ease-expo, ease-out), visibility 0s linear .5s;
}
.ios-lock.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease, ease), transform .7s var(--ease-expo, ease-out), visibility 0s; }
.ios-lock > .ico-lock { width: 18px; height: 18px; margin-bottom: 8px; color: rgba(255, 255, 255, .9); }
.ios-lock-date { margin: 0; font: 600 20px/1.2 var(--ios-font); letter-spacing: -.01em; color: rgba(255, 255, 255, .88); }
.ios-lock-time {
  margin: -2px 0 0; font: 700 104px/1 "SF Pro Rounded", var(--ios-font); letter-spacing: -.03em;
  color: rgba(255, 255, 255, .96); font-variant-numeric: tabular-nums;
}
.ios-focus {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 7px 14px 7px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font: 600 15px/1 var(--ios-font); color: #fff;
}
.ios-focus .ico { width: 17px; height: 17px; color: var(--signal, #CDF546); }
.ios-lock-foot { position: absolute; left: 46px; right: 46px; bottom: 44px; display: flex; justify-content: space-between; }
.ios-lock-btn { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .13); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.ios-lock-btn .ico { width: 22px; height: 22px; color: #fff; }

/* ---- instant state changes (Kima.phone.toggle(..., instant)) ----------- */
.no-anim, .no-anim * { transition: none !important; }
