/* WhatsApp (Web + desktop, 2025-26) — components, built only from whatsapp-tokens.css.
   Study copy for internal design education. WhatsApp's brand and product belong to WhatsApp LLC / Meta.
   Every part has hover, focus, pressed, selected and disabled states. No decorative pseudo-element drawings
   (bubble tails are real inline SVGs), so parts copy cleanly into Figma.
   Sizes come from the measured screens unless the token says [real]. */

.wa-root, .wa-root * { box-sizing: border-box; }
.wa-root { font: var(--wa-type-body-2); color: var(--wa-text); -webkit-font-smoothing: antialiased; }
.wa-i { display: inline-block; flex: none; vertical-align: middle; }
.wa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa-root button { font-family: inherit; }
.wa-root :focus-visible { outline: 2px solid var(--wa-accent); outline-offset: 2px; }

/* ---------------- buttons ---------------- */
.wa-ib { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--wa-icon-strong); display: inline-grid; place-items: center;
  cursor: pointer; padding: 0; position: relative; transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-ib.muted { color: var(--wa-icon); }
.wa-ib:hover { background: var(--wa-highlight); }
.wa-ib:active { background: var(--wa-pressed); }
.wa-ib[aria-pressed="true"], .wa-ib[aria-expanded="true"] { background: var(--wa-highlight); }
.wa-ib:disabled { color: var(--wa-text-disabled); cursor: default; background: transparent; }

.wa-btn { height: 40px; padding: 0 24px; border-radius: var(--wa-radius-full); border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: var(--wa-type-body-2-em); letter-spacing: var(--wa-ls-body-2); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive), box-shadow var(--wa-dur-xfast) var(--wa-ease-responsive), transform var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-btn.primary { background: var(--wa-accent); color: var(--wa-on-accent); }
.wa-btn.primary:hover { background: var(--wa-green-600); }
html.wa-dark .wa-btn.primary:hover { background: var(--wa-green-300); }
.wa-btn.primary:active { transform: scale(.97); }
.wa-btn.secondary { background: transparent; color: var(--wa-action-emphasized); box-shadow: inset 0 0 0 1px var(--wa-outline-2); }
.wa-btn.secondary:hover { background: var(--wa-highlight); }
.wa-btn.tonal { background: var(--wa-accent-deemphasized); color: var(--wa-filter-selected-text); }
.wa-btn.tonal:hover { filter: brightness(.97); }
html.wa-dark .wa-btn.tonal:hover { filter: brightness(1.15); }
.wa-btn.text { background: transparent; color: var(--wa-action-emphasized); padding: 0 12px; }
.wa-btn.text:hover { background: var(--wa-highlight); }
.wa-btn.danger { background: var(--wa-negative); color: #fff; }
.wa-btn.small { height: 32px; padding: 0 16px; }
.wa-btn:disabled, .wa-btn[aria-disabled="true"] { background: var(--wa-highlight); color: var(--wa-text-disabled); box-shadow: none; cursor: default; transform: none; filter: none; }
.wa-btn.follow { height: 32px; padding: 0 16px; background: var(--wa-accent-deemphasized); color: var(--wa-filter-selected-text); }
html.wa-dark .wa-btn.follow { color: var(--wa-accent); }
.wa-btn.follow[aria-pressed="true"] { background: transparent; color: var(--wa-text-2); box-shadow: inset 0 0 0 1px var(--wa-outline-2); }
.wa-fab { width: 56px; height: 56px; border-radius: 16px; border: 0; background: var(--wa-accent); color: var(--wa-on-accent); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--wa-shadow-persistent); transition: transform var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-fab:hover { transform: translateY(-1px); } .wa-fab:active { transform: scale(.96); }
.wa-send { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--wa-accent); color: var(--wa-on-accent); display: grid; place-items: center; cursor: pointer; }
.wa-send:hover { filter: brightness(.95); }

/* ---------------- window chrome (desktop app) ---------------- */
.wa-titlebar { height: 40px; background: var(--wa-titlebar); display: flex; align-items: center; color: var(--wa-text); user-select: none; position: relative; }
.wa-titlebar .logo { position: absolute; left: 16px; top: 10px; color: var(--wa-accent); }
html.wa-dark .wa-titlebar .logo { color: var(--wa-accent); }
.wa-titlebar .name { position: absolute; left: 46px; top: 12px; font: 400 12px/16px var(--wa-font); }
.wa-titlebar .win { position: absolute; right: 0; top: 0; display: flex; }
.wa-titlebar .win button { width: 46px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--wa-text); }
.wa-titlebar .win button:hover { background: var(--wa-highlight); }
.wa-titlebar .win button.close:hover { background: #C42B1C; color: #fff; }
.wa-titlebar .win svg { width: 10px; height: 10px; }

/* ---------------- app frame ---------------- */
.wa-app { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--wa-nav); display: flex; flex-direction: column; }
.wa-body { flex: 1; min-height: 0; display: flex; position: relative; }
.wa-content { flex: 1; min-width: 0; display: flex; position: relative; background: var(--wa-surface); }
.wa-app.wa-desktop .wa-content { border-top: 1px solid var(--wa-window-line); border-left: 1px solid var(--wa-window-line); border-top-left-radius: var(--wa-content-r, 8px); overflow: hidden; }

/* nav rail [real] 64px */
.wa-rail { width: var(--wa-rail-w); flex: none; background: var(--wa-nav); display: flex; flex-direction: column; align-items: center; padding: var(--rail-pt, 10px) 0 var(--rail-pb, 10px); position: relative; }
.wa-app:not(.wa-desktop) .wa-rail { border-right: 1px solid var(--wa-divider); }
.wa-rail .grp { display: flex; flex-direction: column; align-items: center; gap: var(--rail-gap, 4px); }
.wa-rail .sep { width: 44px; height: 1px; background: var(--wa-divider); margin: var(--rail-sep-m, 12px) 0; flex: none; }
.wa-rail .grow { flex: 1; }
.wa-rail .sep.bsep { margin: var(--bsep-m, 6px 0 8px); }
.wa-rail-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--wa-icon); display: grid; place-items: center; cursor: pointer; position: relative;
  transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive), color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-rail-btn:hover { background: var(--wa-highlight); }
.wa-rail-btn[aria-current="page"] { background: var(--wa-highlight); color: var(--wa-icon-strong); }
html.wa-dark .wa-rail-btn[aria-current="page"] { background: rgba(255, 255, 255, .1); }
.wa-rail-btn .dot { position: absolute; top: var(--dot-t, 2px); right: var(--dot-r, 3px); width: 8px; height: 8px; border-radius: 50%; background: var(--wa-activity); box-shadow: 0 0 0 2px var(--wa-nav); }
.wa-rail-btn .count { position: absolute; top: var(--count-t, -2px); right: var(--count-r, -2px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wa-unread-badge); color: var(--wa-on-accent);
  font: 500 11px/18px var(--wa-font); text-align: center; box-shadow: 0 0 0 2px var(--wa-nav); }
.wa-rail .me { width: 28px; height: 28px; }
.wa-rail .beta { font: 600 11px/14px var(--wa-font); color: var(--wa-text-2); letter-spacing: .04em; margin: 6px 0; }

/* side panel (chat list, updates, settings) */
.wa-side { width: var(--wa-side-w, 432px); flex: none; background: var(--wa-surface); border-right: 1px solid var(--wa-divider); display: flex; flex-direction: column; min-height: 0; position: relative; }
.wa-side-head { height: var(--wa-header-h); flex: none; display: flex; align-items: center; padding: 0 var(--head-pr, 13px) 0 var(--head-pl, 20px); gap: var(--head-gap, 8px); }
.wa-side-head h1, .wa-side-head h2 { margin: 0; font: var(--wa-type-panel-title); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-side-head.sub h1, .wa-side-head.sub h2 { font: 400 16px/21px var(--wa-font); }
.wa-side-head .back { margin-left: -8px; margin-right: 12px; }
.wa-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--wa-outline-2) transparent; }

/* search field */
.wa-search { height: var(--wa-search-h); margin: var(--search-m, 0 20px); border-radius: var(--wa-radius-full); background: var(--wa-highlight); display: flex; align-items: center; gap: 12px; padding: 0 16px 0 var(--search-pl, 16px);
  color: var(--wa-icon); position: relative; transition: box-shadow var(--wa-dur-xfast) var(--wa-ease-responsive), background-color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-search:hover { background: rgba(194, 189, 184, .25); }
html.wa-dark .wa-search:hover { background: rgba(255, 255, 255, .14); }
.wa-search:focus-within { background: var(--wa-surface); box-shadow: inset 0 0 0 2px var(--wa-accent); }
.wa-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 15px/20px var(--wa-font); color: var(--wa-text); padding: 0; }
.wa-search input::placeholder { color: var(--wa-text-2); opacity: 1; }
.wa-search .clear { width: 24px; height: 24px; }
.wa-search .ai-ring { width: 20px; height: 20px; border-radius: 50%; flex: none; background: conic-gradient(from 200deg, #0082FB, #A33BFF, #FF4FB9, #00C6FF, #0082FB); -webkit-mask: radial-gradient(circle, transparent 6px, #000 6.5px); mask: radial-gradient(circle, transparent 6px, #000 6.5px); }

/* filter chips */
.wa-chips { display: flex; gap: var(--chip-gap, 8px); padding: var(--chips-p, 14px 20px 10px); flex: none; overflow-x: auto; scrollbar-width: none; }
.wa-chip { height: var(--wa-chip-h); padding: 0 var(--chip-px, 11px); min-width: 46px; justify-content: center; border-radius: var(--wa-radius-full); border: 1px solid var(--wa-outline-2); background: transparent; color: var(--wa-text-2); white-space: nowrap;
  font: 400 var(--chip-fs, 15px)/20px var(--wa-font);  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; flex: none;
  transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive), border-color var(--wa-dur-xfast) var(--wa-ease-responsive), color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-chip:hover { background: var(--wa-highlight); }
.wa-chip[aria-pressed="true"], .wa-chip[aria-selected="true"] { background: var(--wa-filter-selected); border-color: transparent; color: var(--wa-filter-selected-text); }
.wa-chip:disabled { color: var(--wa-text-disabled); cursor: default; background: transparent; }
.wa-chip .n { font-size: 12px; opacity: .8; }

/* chat list rows */
.wa-list { list-style: none; margin: 0; padding: var(--list-p, 0 10px); }
.wa-row { height: var(--wa-row-h); display: flex; align-items: center; gap: 0; padding: 0 var(--row-pr, 10px) 0 var(--row-pl, 10px); border-radius: var(--wa-radius-row); cursor: pointer; position: relative;
  margin: var(--row-m, 0); transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-row::selection { background: none; }
.wa-row .bg { position: absolute; inset: var(--row-bg-inset, 3px 0); border-radius: var(--wa-radius-row); pointer-events: none; transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-row:hover .bg { background: var(--wa-highlight); }
.wa-row[aria-selected="true"] .bg { background: var(--wa-active-row); }
html.wa-dark .wa-row[aria-selected="true"] .bg { background: rgba(255, 255, 255, .1); }
.wa-row:focus-visible { outline: 2px solid var(--wa-accent); outline-offset: -2px; }
.wa-row > .wa-av, .wa-row > .wa-ring { margin-right: var(--row-av-gap, 12px); position: relative; z-index: 1; }
.wa-row > .wa-ring { width: 48px; height: 48px; padding: 0; } .wa-row > .wa-ring > .wa-av { width: 42px; height: 42px; }
.wa-row .txt { flex: 1; min-width: 0; position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--row-line-gap, 3px); padding-bottom: var(--row-txt-pb, 3px); }
.wa-row .l1, .wa-row .l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wa-row .name { flex: 1; min-width: 0; font: var(--wa-type-chat-name); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--wa-text); }
.wa-row .time { font: var(--wa-type-chat-time); color: var(--wa-text-2); flex: none; }
.wa-row.unread .time { color: var(--wa-action-emphasized); }
.wa-row .prev { flex: 1; min-width: 0; font: var(--wa-type-chat-preview); color: var(--wa-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.wa-row .prev .wa-i { color: var(--wa-text-2); }
.wa-row .prev .tick.read { color: var(--wa-read); }
.wa-row .prev .typing { color: var(--wa-action-emphasized); font-weight: 600; }
.wa-row .prev .draft { color: var(--wa-action-emphasized); }
.wa-row .flags { display: flex; align-items: center; gap: 4px; flex: none; color: var(--wa-text-2); }
.wa-row .hover-menu { opacity: 0; position: absolute; right: -4px; bottom: 0; width: 20px; color: var(--wa-text-2); transition: opacity var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-row .l2 { position: relative; }
.wa-row:hover .flags { margin-right: 22px; }
.wa-row:hover .hover-menu, .wa-row:focus-within .hover-menu { opacity: 1; }
.wa-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wa-unread-badge); color: var(--wa-on-accent); font: 600 12px/20px var(--wa-font); text-align: center; flex: none; }
.wa-badge.muted { background: var(--wa-outline); }
.wa-mention { color: var(--wa-unread-badge); font: 600 18px/20px var(--wa-font); }
.wa-archived { height: 48px; display: flex; align-items: center; gap: 24px; padding: 0 20px 0 30px; cursor: pointer; border-radius: var(--wa-radius-row); font: var(--wa-type-chat-name); }
.wa-archived:hover { background: var(--wa-highlight); }
.wa-archived .wa-i { color: var(--wa-action-emphasized); }
.wa-archived .n { margin-left: auto; font: var(--wa-type-chat-time); color: var(--wa-action-emphasized); }
.wa-e2e-foot { padding: 20px 0 32px; text-align: center; font: var(--wa-type-body-3); color: var(--wa-text-2); border-top: 1px solid var(--wa-divider); margin: 8px 20px 0; }
.wa-e2e-foot a { color: var(--wa-action-emphasized); text-decoration: none; font-weight: 600; }
.wa-sect { font: 400 16px/21px var(--wa-font); color: var(--wa-text); padding: 16px 20px 8px; display: flex; align-items: center; gap: 8px; }
.wa-sect .end { margin-left: auto; display: flex; gap: 4px; }

/* avatars */
.wa-av { width: var(--wa-avatar); height: var(--wa-avatar); border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; position: relative;
  background: var(--av-bg, var(--wa-pp-gray-bg)); color: var(--av-fg, var(--wa-pp-gray)); font: 400 20px/1 var(--wa-font); letter-spacing: -.01em; user-select: none; }
.wa-av.s40 { width: 40px; height: 40px; font-size: 16px; } .wa-av.s28 { width: 28px; height: 28px; font-size: 11px; } .wa-av.s32 { width: 32px; height: 32px; font-size: 13px; }
.wa-av.s80 { width: 80px; height: 80px; font-size: 30px; } .wa-av.s200 { width: 200px; height: 200px; font-size: 72px; }
.wa-av img, .wa-av svg.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.wa-av .wa-i { width: 55%; height: 55%; }
.wa-av.green { --av-bg: var(--wa-pp-green-bg); --av-fg: var(--wa-pp-green); } .wa-av.teal { --av-bg: var(--wa-pp-teal-bg); --av-fg: var(--wa-pp-teal); }
.wa-av.sky { --av-bg: var(--wa-pp-sky-bg); --av-fg: var(--wa-pp-sky); } .wa-av.cobalt { --av-bg: var(--wa-pp-cobalt-bg); --av-fg: var(--wa-pp-cobalt); }
.wa-av.purple { --av-bg: var(--wa-pp-purple-bg); --av-fg: var(--wa-pp-purple); } .wa-av.pink { --av-bg: var(--wa-pp-pink-bg); --av-fg: var(--wa-pp-pink); }
.wa-av.red { --av-bg: var(--wa-pp-red-bg); --av-fg: var(--wa-pp-red); } .wa-av.orange { --av-bg: var(--wa-pp-orange-bg); --av-fg: var(--wa-pp-orange); }
.wa-av.yellow { --av-bg: var(--wa-pp-yellow-bg); --av-fg: var(--wa-pp-yellow); } .wa-av.brown { --av-bg: var(--wa-pp-brown-bg); --av-fg: var(--wa-pp-brown); }
.wa-av.brand { --av-bg: var(--wa-brand); --av-fg: #fff; }
.wa-ring { padding: 3px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--wa-status-unseen); display: grid; place-items: center; flex: none; }
.wa-ring.seen { box-shadow: inset 0 0 0 2px var(--wa-status-seen); }
.wa-ring > .wa-av { width: calc(var(--ring-size, 48px) - 6px); height: calc(var(--ring-size, 48px) - 6px); }
.wa-av-add { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--wa-accent); color: var(--wa-on-accent); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--wa-surface); }

/* ---------------- conversation ---------------- */
.wa-main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--wa-wallpaper); }
.wa-conv-head { height: var(--wa-header-h); flex: none; background: var(--wa-surface); display: flex; align-items: center; padding: 0 var(--ch-pr, 18px) 0 var(--ch-pl, 16px); gap: 0; position: relative; z-index: 2; cursor: default; }
.wa-conv-head .who { display: flex; align-items: center; min-width: 0; flex: 1; cursor: pointer; border-radius: 8px; height: 100%; }
.wa-conv-head .who .wa-av { margin-right: var(--ch-av-gap, 14px); }
.wa-conv-head .nm { font: var(--wa-type-chat-name); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv-head .sub { font: 400 14px/20px var(--wa-font); color: var(--wa-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv-head .tools { display: flex; align-items: center; gap: var(--ch-gap, 8px); color: var(--wa-icon-strong); }
.wa-conv-head .vsep { width: 1px; height: 24px; background: var(--wa-divider); margin: 0 var(--ch-sep-m, 10px); }
.wa-callpill { height: 40px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px; padding: 0 14px 0 16px; border: 1px solid var(--wa-outline-2); background: transparent; cursor: pointer; color: var(--wa-icon-strong); }
.wa-callpill:hover, .wa-callpill[aria-expanded="true"] { background: var(--wa-highlight); }

.wa-wall { position: absolute; inset: 0; background-color: var(--wa-wallpaper); pointer-events: none; }
/* [real] WAWebConversationBackground: a layer filled with the foreground-wallpaper colour, masked by WhatsApp's doodle SVG,
   repeated at 540 x 960 px (412.5 x 749.25 on 2x screens). The doodle is a real WhatsApp asset (study use only).
   Masks are blocked on file:// pages, so we ship the same SVG twice with the colour already filled in (img/wa-doodle-light.svg =
   #EAE0D3, wa-doodle-dark.svg = white at 10%) and paint it as a background image. Same pixels, works everywhere. */
.wa-wall::after { content: ""; position: absolute; inset: 0; background-image: url("img/wa-doodle-light.svg"); background-repeat: repeat;
  background-size: var(--doodle-size, 540px 960px); background-position: var(--doodle-pos, 0 0); }
html.wa-dark .wa-wall::after { background-image: url("img/wa-doodle-dark.svg"); }
.wa-wall.off::after { display: none; }
.wa-msgs { flex: 1; min-height: 0; overflow-y: auto; position: relative; z-index: 1; padding: var(--msgs-p, 8px 23px 8px 22px); display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--wa-outline-2) transparent; }
.wa-msgs .push { flex: 1; }

/* message rows + bubbles */
.wa-m { display: flex; align-items: flex-start; position: relative; margin-top: var(--m-gap, 4px); }
.wa-m.first { margin-top: var(--m-gap-first, 9px); }
.wa-m.out { justify-content: flex-end; }
.wa-m .sav { width: 28px; height: 28px; margin: 0 var(--sav-gap, 10px) 0 0; flex: none; }
.wa-m.group.in:not(.first) { padding-left: calc(28px + var(--sav-gap, 10px)); }
.wa-bub { position: relative; max-width: var(--bub-max, 65%); border-radius: var(--wa-radius-bubble); padding: var(--bub-p, 7px 7px 10px 10px); font: var(--wa-type-message); color: var(--wa-text);
  box-shadow: var(--wa-bubble-shadow); word-wrap: break-word; }
.wa-m.in .wa-bub { background: var(--wa-bubble-in); }
.wa-m.out .wa-bub { background: var(--wa-bubble-out); }
.wa-m.first.in .wa-bub { border-top-left-radius: 0; }
.wa-m.first.out .wa-bub { border-top-right-radius: 0; }
.wa-bub .tail { position: absolute; top: 0; width: 8px; height: 13px; display: block; }
.wa-m.in .wa-bub .tail { left: -8px; color: var(--wa-bubble-in); }
.wa-m.out .wa-bub .tail { right: -8px; color: var(--wa-bubble-out); }
.wa-bub .from { font: var(--wa-type-sender); display: block; margin: var(--from-m, -1px 0 2px); color: var(--sender, var(--wa-sender-1)); }
.wa-bub .t { white-space: pre-wrap; }
.wa-bub .meta { float: right; margin: var(--meta-m, 11px -1px -7px 12px); font: var(--wa-type-meta); color: var(--wa-bubble-meta); display: inline-flex; align-items: center; gap: 3px; height: 15px; white-space: nowrap; position: relative; top: 1px; }
.wa-bub .meta .wa-i { color: var(--wa-bubble-meta); }
.wa-bub .meta .read { color: var(--wa-read); }
.wa-bub .meta .edited { font-style: normal; margin-right: 2px; }
.wa-bub.media { padding: 3px; }
.wa-bub.media .pic { display: block; border-radius: 6px; overflow: hidden; position: relative; }
.wa-bub.media .pic img, .wa-bub.media .pic svg { display: block; width: 100%; height: 100%; }
.wa-bub.media .meta.over { position: absolute; right: 7px; bottom: 5px; margin: 0; float: none; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.wa-bub.media .meta.over .wa-i { color: #fff; }
.wa-bub.media .cap { padding: 6px 4px 4px 6px; }
.wa-quote { display: flex; border-radius: 6px; overflow: hidden; background: var(--wa-bubble-overlay); margin: 0 0 4px -4px; margin-right: -3px; min-height: 42px; cursor: pointer; }
html:not(.wa-dark) .wa-quote { background: rgba(11, 20, 26, .05); }
.wa-quote .bar { width: 4px; flex: none; background: var(--sender, var(--wa-sender-1)); }
.wa-quote .qb { padding: 5px 10px 6px 8px; min-width: 0; }
.wa-quote .qn { font: 500 12.8px/18px var(--wa-font); color: var(--sender, var(--wa-sender-1)); }
.wa-quote .qt { font: 400 13px/18px var(--wa-font); color: var(--wa-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-reacts { position: absolute; bottom: -18px; left: 8px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--wa-bubble-in); box-shadow: 0 0 0 2px var(--wa-wallpaper), var(--wa-bubble-shadow); display: flex; align-items: center; gap: 2px; font: 400 14px/1 var(--wa-font); cursor: pointer; }
.wa-m.out .wa-reacts { left: auto; right: 8px; }
.wa-reacts .n { font-size: 12px; color: var(--wa-text-2); margin-left: 2px; }
.wa-m.has-react { margin-bottom: 18px; }
.wa-m .acts { position: absolute; top: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-m.in .acts { left: calc(100% + 0px); } .wa-m.out .acts { right: calc(100% + 0px); }
.wa-m.in .wa-bub + .acts { position: relative; left: auto; margin-left: 6px; } .wa-m.out .acts { position: relative; right: auto; margin-right: 6px; order: -1; }
.wa-m:hover .acts, .wa-m:focus-within .acts { opacity: 1; }
.wa-m .acts button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--wa-bubble-system); color: var(--wa-icon); display: grid; place-items: center; cursor: pointer; box-shadow: var(--wa-bubble-shadow); }
.wa-m .acts button:hover { color: var(--wa-icon-strong); }
.wa-bub .chev { position: absolute; top: 3px; right: 3px; width: 24px; height: 22px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--wa-text-2); cursor: pointer; opacity: 0;
  background: radial-gradient(circle at 60% 40%, var(--chev-bg, var(--wa-bubble-in)) 55%, transparent 75%); transition: opacity var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-m.out .wa-bub .chev { --chev-bg: var(--wa-bubble-out); }
.wa-bub:hover .chev, .wa-bub .chev[aria-expanded="true"] { opacity: 1; }
.wa-m.flash .wa-bub { animation: wa-flash 1.2s var(--wa-ease-ambient); }
@keyframes wa-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--wa-accent); } 100% { box-shadow: var(--wa-bubble-shadow); } }

/* system pills */
.wa-pill { align-self: center; margin: 12px 0 8px; padding: 5px 12px 6px; border-radius: 8px; background: var(--wa-bubble-system); font: 400 12.5px/17px var(--wa-font); color: var(--wa-text-2); box-shadow: var(--wa-bubble-shadow); text-align: center; max-width: 80%; }
.wa-pill.e2e { background: var(--wa-bubble-e2e); color: var(--wa-text-2); }
html.wa-dark .wa-pill.e2e { color: var(--wa-yellow-300); }
.wa-pill.sticky { position: sticky; top: 4px; z-index: 3; }
.wa-unread-bar { align-self: stretch; margin: 10px -23px 6px -22px; padding: 5px; text-align: center; background: var(--wa-bubble-system); font: 400 12.5px/17px var(--wa-font); color: var(--wa-text-2); }

/* voice note */
.wa-voice { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0 0; }
.wa-bub:has(.wa-voice) { width: 320px; max-width: 100%; }
.wa-voice .play { width: 34px; height: 34px; border: 0; background: transparent; color: var(--wa-icon); display: grid; place-items: center; cursor: pointer; border-radius: 50%; flex: none; }
.wa-voice .play:hover { background: var(--wa-highlight); }
.wa-voice .wave { flex: 1; min-width: 0; overflow: hidden; height: 26px; display: flex; align-items: center; gap: 2px; position: relative; cursor: pointer; }
.wa-voice .wave i { width: 3px; border-radius: 2px; background: var(--wa-ptt-wave-in); flex: none; }
.wa-m.out .wa-voice .wave i { background: var(--wa-ptt-wave-out); }
.wa-voice .wave i.on { background: var(--wa-ptt-wave-in-played); }
.wa-m.out .wa-voice .wave i.on { background: var(--wa-ptt-wave-out-played); }
.wa-voice .knob { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--wa-ptt-unplayed); transition: left 100ms linear; }
.wa-voice.played .knob { background: var(--wa-ptt-played); }
.wa-voice .side { position: relative; flex: none; }
.wa-voice .side .wa-av { width: 44px; height: 44px; font-size: 17px; }
.wa-voice .side .mic { position: absolute; left: -6px; bottom: -2px; color: var(--wa-ptt-unplayed); }
.wa-voice.played .side .mic { color: var(--wa-ptt-played); }
.wa-voice-foot { display: flex; justify-content: space-between; font: var(--wa-type-meta); color: var(--wa-bubble-meta); padding: 0 0 0 44px; margin-top: -2px; }
.wa-voice .speed { height: 22px; padding: 0 8px; border-radius: 11px; border: 0; background: var(--wa-highlight); font: 600 12px/22px var(--wa-font); color: var(--wa-text-2); cursor: pointer; }

/* document */
.wa-doc { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; background: var(--wa-bubble-overlay); min-width: min(260px, 100%); cursor: pointer; }
html:not(.wa-dark) .wa-doc { background: rgba(11, 20, 26, .04); }
.wa-doc .ico { width: 28px; height: 34px; border-radius: 3px; background: #E2515A; color: #fff; display: grid; place-items: center; font: 700 8px/1 var(--wa-font); flex: none; }
.wa-doc .ico.xls { background: #1D6F42; } .wa-doc .ico.doc { background: #2A5699; }
.wa-doc .dn { font: 400 14px/19px var(--wa-font); }
.wa-doc .ds { font: var(--wa-type-body-3); color: var(--wa-text-2); }

/* composer */
.wa-composer { flex: none; position: relative; z-index: 2; padding: var(--comp-p, 0 12px 12px); }
.wa-composer .box { min-height: var(--wa-composer-h); border-radius: calc(var(--wa-composer-h) / 2); background: var(--wa-composer); display: flex; align-items: center; gap: var(--comp-gap, 0px); padding: 0 var(--comp-pr, 6px) 0 var(--comp-pl, 6px);
  box-shadow: 0 1px 2px rgba(11, 20, 26, .08); }
html.wa-dark .wa-composer .box { box-shadow: none; }
.wa-composer .box .wa-ib { color: var(--wa-icon-strong); }
.wa-composer .field { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none; font: 400 15px/20px var(--wa-font); color: var(--wa-text); padding: 16px 8px 16px var(--comp-field-pl, 8px); max-height: 140px; }
.wa-composer .field::placeholder { color: var(--wa-text-2); opacity: 1; }
.wa-composer .reply-to { margin: 0 0 6px; }
.wa-composer .rec { flex: 1; display: flex; align-items: center; gap: 12px; color: var(--wa-negative); font: 400 15px/20px var(--wa-font); padding-left: 8px; }
.wa-composer .rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wa-negative); animation: wa-blink 1s steps(2, start) infinite; }
@keyframes wa-blink { to { visibility: hidden; } }

/* quick replies (WhatsApp Business "/" shortcuts) */
.wa-qr { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 6px); background: var(--wa-elevated); border-radius: 16px; box-shadow: var(--wa-shadow-menu); padding: 8px 0; max-height: 260px; overflow: auto; }
.wa-qr .h { padding: 6px 16px; font: var(--wa-type-body-3-em); color: var(--wa-text-2); }
.wa-qr button { display: flex; width: 100%; gap: 12px; align-items: baseline; padding: 8px 16px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.wa-qr button:hover, .wa-qr button[aria-selected="true"] { background: var(--wa-highlight); }
.wa-qr b { font: 600 14px/20px var(--wa-font); color: var(--wa-action-emphasized); flex: none; }
.wa-qr span { font: var(--wa-type-body-2); color: var(--wa-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* empty state (no chat open) */
.wa-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 8px; background: var(--wa-surface-2); }
html.wa-dark .wa-empty { background: var(--wa-surface); }
.wa-empty .ill { color: var(--wa-text-2); margin-bottom: 10px; }
.wa-empty h2 { margin: 0; font: var(--wa-type-large-title-2); }
.wa-empty p { margin: 0; font: var(--wa-type-body-2); color: var(--wa-text-2); max-width: 46ch; }
.wa-empty .lock { position: absolute; bottom: 32px; left: 0; right: 0; font: var(--wa-type-body-3); color: var(--wa-text-2); display: flex; justify-content: center; align-items: center; gap: 6px; }

/* ---------------- menus, tooltips, toasts, dialogs ---------------- */
.wa-menu { position: absolute; z-index: 50; min-width: 220px; padding: 8px 0; border-radius: 16px; background: var(--wa-elevated); box-shadow: var(--wa-shadow-menu); transform-origin: top right;
  animation: wa-pop var(--wa-dur-fast-min) var(--wa-ease-responsive); }
html.wa-dark .wa-menu { background: var(--wa-elevated-2); }
.wa-menu[hidden] { display: none; }
.wa-menu button, .wa-menu a { display: flex; align-items: center; gap: 16px; width: 100%; height: 40px; padding: 0 24px 0 20px; border: 0; background: transparent; text-align: left; font: 400 14.5px/20px var(--wa-font); color: var(--wa-text); cursor: pointer; text-decoration: none; }
.wa-menu button:hover, .wa-menu button:focus-visible, .wa-menu a:hover { background: var(--wa-highlight); outline: 0; }
.wa-menu button .wa-i { color: var(--wa-icon); }
.wa-menu button.danger { color: var(--wa-negative); } .wa-menu button.danger .wa-i { color: var(--wa-negative); }
.wa-menu button:disabled { color: var(--wa-text-disabled); cursor: default; background: transparent; }
.wa-menu hr { border: 0; height: 1px; background: var(--wa-divider); margin: 6px 0; }
@keyframes wa-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.wa-pop { position: absolute; z-index: 40; background: var(--wa-elevated); border-radius: 20px; box-shadow: var(--wa-shadow-card); padding: 20px; animation: wa-pop var(--wa-dur-fast-min) var(--wa-ease-responsive); }
html.wa-dark .wa-pop { background: var(--wa-elevated); }
.wa-emoji-bar { display: flex; gap: 2px; padding: 4px 6px; border-radius: 24px; background: var(--wa-elevated); box-shadow: var(--wa-shadow-menu); }
.wa-emoji-bar button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; transition: transform var(--wa-dur-xfast) var(--wa-ease-elastic); }
.wa-emoji-bar button:hover { background: var(--wa-highlight); transform: scale(1.18); }
.wa-tip { position: absolute; z-index: 60; padding: 4px 8px; border-radius: 6px; background: var(--wa-inverse); color: var(--wa-on-inverse); font: 400 12px/16px var(--wa-font); white-space: nowrap; pointer-events: none;
  transition: opacity var(--wa-dur-xfast) var(--wa-ease-ambient); }
html.wa-dark .wa-tip { background: #F4F4F4; color: #0A0A0A; }
@keyframes wa-fade { from { opacity: 0; } }
.wa-toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; min-width: 280px; max-width: 90%; padding: 12px 16px 12px 20px; border-radius: 12px; background: var(--wa-inverse); color: var(--wa-on-inverse);
  font: 400 14px/20px var(--wa-font); display: flex; align-items: center; gap: 16px; box-shadow: var(--wa-shadow-elevated); animation: wa-toast var(--wa-dur-short-in) var(--wa-ease-responsive); }
.wa-toast button { margin-left: auto; border: 0; background: transparent; color: var(--wa-green-300); font: 600 14px/20px var(--wa-font); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
html.wa-dark .wa-toast button { color: var(--wa-green-600); }
.wa-toast button:hover { background: rgba(255, 255, 255, .1); }
@keyframes wa-toast { from { opacity: 0; transform: translate(-50%, 12px); } }
.wa-scrim { position: absolute; inset: 0; z-index: 80; background: var(--wa-dimmer); display: grid; place-items: center; animation: wa-fade var(--wa-dur-xfast) var(--wa-ease-ambient); }
.wa-dialog { width: min(480px, calc(100% - 32px)); background: var(--wa-elevated); border-radius: 24px; box-shadow: var(--wa-shadow-card); padding: 24px 24px 20px; animation: wa-pop var(--wa-dur-fast-min) var(--wa-ease-responsive); }
html.wa-dark .wa-dialog { background: var(--wa-elevated-2); }
.wa-dialog h3 { margin: 0 0 12px; font: var(--wa-type-headline-2); }
.wa-dialog p { margin: 0 0 16px; font: var(--wa-type-body-2); color: var(--wa-text-2); }
.wa-dialog .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---------------- form parts ---------------- */
.wa-field { display: flex; flex-direction: column; gap: 6px; }
.wa-field label { font: var(--wa-type-body-3-em); color: var(--wa-action-emphasized); }
.wa-field input, .wa-field textarea { border: 0; border-bottom: 2px solid var(--wa-outline-2); background: transparent; font: var(--wa-type-body-1); color: var(--wa-text); padding: 6px 0; outline: 0; transition: border-color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-field input:focus, .wa-field textarea:focus { border-bottom-color: var(--wa-accent); }
.wa-field input:disabled { color: var(--wa-text-disabled); }
.wa-field.err input { border-bottom-color: var(--wa-negative); } .wa-field .hint { font: var(--wa-type-body-3); color: var(--wa-text-2); } .wa-field.err .hint { color: var(--wa-negative); }
.wa-toggle { width: 36px; height: 20px; border-radius: 10px; border: 0; padding: 0; position: relative; cursor: pointer; background: var(--wa-outline); flex: none; transition: background-color var(--wa-dur-xfast) var(--wa-ease-responsive); }
.wa-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform var(--wa-dur-fast-min) var(--wa-ease-responsive); }
.wa-toggle[aria-checked="true"] { background: var(--wa-accent); }
.wa-toggle[aria-checked="true"]::after { transform: translateX(16px); }
html.wa-dark .wa-toggle[aria-checked="true"]::after { background: #0A0A0A; }
.wa-toggle:disabled { opacity: .4; cursor: default; }
.wa-check { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--wa-outline); background: transparent; display: grid; place-items: center; color: var(--wa-on-accent); cursor: pointer; padding: 0; flex: none; }
.wa-check[aria-checked="true"] { background: var(--wa-accent); border-color: var(--wa-accent); }
.wa-check .wa-i { opacity: 0; } .wa-check[aria-checked="true"] .wa-i { opacity: 1; }
.wa-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--wa-outline); background: transparent; padding: 0; cursor: pointer; flex: none; position: relative; }
.wa-radio[aria-checked="true"] { border-color: var(--wa-accent); } .wa-radio[aria-checked="true"]::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--wa-accent); }

/* settings lists */
.wa-set { list-style: none; margin: 0; padding: 0 10px; }
.wa-set-item { display: flex; align-items: center; gap: 20px; min-height: 64px; padding: 10px 16px 10px 14px; border-radius: var(--wa-radius-row); cursor: pointer; }
.wa-set-item:hover { background: var(--wa-highlight); }
.wa-set-item[aria-current="true"] { background: var(--wa-active-row); }
.wa-set-item > .wa-i { color: var(--wa-icon); }
.wa-set-item .tt { flex: 1; min-width: 0; } .wa-set-item .tt b { display: block; font: var(--wa-type-chat-name); font-weight: 400; } .wa-set-item .tt span { display: block; font: var(--wa-type-body-2); color: var(--wa-text-2); }
.wa-set-item.danger, .wa-set-item.danger > .wa-i { color: var(--wa-negative); }
.wa-profile-card { display: flex; align-items: center; gap: 16px; padding: 12px 24px 16px; cursor: pointer; border-radius: var(--wa-radius-row); margin: 0 10px; }
.wa-profile-card:hover { background: var(--wa-highlight); }

/* chat theme tiles (Settings > Chats > Default chat theme) */
.wa-themes { display: grid; grid-template-columns: repeat(5, var(--tile-w, 80px)); gap: var(--tile-gap, 14px 14px); padding: var(--themes-p, 18px 24px); }
.wa-theme { border: 0; background: transparent; padding: 0; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; color: var(--wa-text); font: 400 11px/15px var(--wa-font); }
.wa-theme .sw { display: block; width: var(--tile-w, 80px); height: var(--tile-h, 80px); border-radius: 10px; background: var(--wall, var(--wa-wallpaper)); position: relative; overflow: hidden; margin-bottom: 6px; box-shadow: inset 0 0 0 1px var(--wa-divider); }
.wa-theme .sw i { position: absolute; height: 9px; border-radius: 5px; }
.wa-theme .sw i.a { left: 10px; bottom: 30px; width: 34px; background: var(--wa-bubble-in); }
.wa-theme .sw i.b { right: 10px; bottom: 18px; width: 38px; background: var(--out, var(--wa-bubble-out)); }
.wa-theme:hover .sw { box-shadow: inset 0 0 0 1px var(--wa-outline); }
.wa-theme[aria-checked="true"] .sw { box-shadow: inset 0 0 0 3px var(--wa-accent); }
.wa-theme[aria-checked="true"] { font-weight: 700; }

/* channels / updates */
.wa-chan { display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 72px; cursor: pointer; border-radius: var(--wa-radius-row); margin: 0 10px; }
.wa-chan:hover { background: var(--wa-highlight); }
.wa-chan .tt { flex: 1; min-width: 0; } .wa-chan .tt b { display: flex; align-items: center; gap: 4px; font: var(--wa-type-chat-name); font-weight: 400; } .wa-chan .tt span { display: block; font: var(--wa-type-body-2); color: var(--wa-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-verified { color: var(--wa-verified); }
.wa-status-row { display: flex; align-items: center; gap: 14px; padding: 8px 20px; cursor: pointer; border-radius: var(--wa-radius-row); margin: 0 10px; }
.wa-status-row:hover { background: var(--wa-highlight); }

/* contact info drawer */
.wa-drawer { width: var(--wa-drawer-w, 400px); flex: none; background: var(--wa-surface); border-left: 1px solid var(--wa-divider); display: flex; flex-direction: column; min-height: 0;
  animation: wa-drawer var(--wa-dur-short-in) var(--wa-ease-organic); }
@keyframes wa-drawer { from { transform: translateX(40px); opacity: 0; } }
.wa-drawer .hero { text-align: center; padding: 28px 24px 20px; }
.wa-drawer .hero .wa-av { margin: 0 auto 14px; }
.wa-drawer .hero h3 { margin: 0; font: var(--wa-type-headline-2); }
.wa-drawer .hero p { margin: 4px 0 0; font: var(--wa-type-body-1); color: var(--wa-text-2); }
.wa-drawer .quick { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.wa-drawer .quick button { width: 88px; height: 64px; border-radius: 14px; border: 1px solid var(--wa-outline-2); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; color: var(--wa-action-emphasized); font: 400 13px/16px var(--wa-font); }
.wa-drawer .quick button:hover { background: var(--wa-highlight); }
.wa-drawer .blk { padding: 14px 24px; margin-top: 8px; box-shadow: 0 -8px 0 var(--wa-surface-2); }  /* grey band between sections */
html.wa-dark .wa-drawer .blk { box-shadow: 0 -8px 0 #0A0A0A; }
.wa-drawer .blk h4 { margin: 0 0 6px; font: var(--wa-type-body-2); color: var(--wa-text-2); display: flex; justify-content: space-between; }
.wa-drawer .media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wa-drawer .media i { aspect-ratio: 1; border-radius: 8px; background: var(--wa-highlight); display: block; }

/* loading */
.wa-spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--wa-highlight); border-top-color: var(--wa-accent); animation: wa-spin 1s linear infinite; }
@keyframes wa-spin { to { transform: rotate(360deg); } }
.wa-progress { height: 3px; background: var(--wa-highlight); border-radius: 2px; overflow: hidden; }
.wa-progress i { display: block; height: 100%; width: 40%; background: var(--wa-accent); border-radius: 2px; animation: wa-prog 1.4s var(--wa-ease-organic) infinite; }
@keyframes wa-prog { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.wa-skel { background: var(--wa-highlight); border-radius: 8px; animation: wa-skel 1.4s ease-in-out infinite; }
@keyframes wa-skel { 50% { opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  .wa-root *, .wa-root *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* call-log bubble ("Voice call · No answer") [measured] T2 */
.wa-bub.call { padding: 4px 4px 6px; min-width: 260px; }
.wa-calllog { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 6px; background: var(--wa-bubble-overlay); cursor: pointer; margin-bottom: 2px; }
html:not(.wa-dark) .wa-calllog { background: rgba(11, 20, 26, .05); }
.wa-calllog .ci { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--wa-highlight); color: var(--wa-negative); flex: none; }
.wa-calllog b { display: block; font: 400 15px/20px var(--wa-font); }
.wa-calllog span span { display: block; font: var(--wa-type-body-2); color: var(--wa-text-2); }
.wa-bub.call .meta { margin: 0 4px 0 0; float: none; display: flex; justify-content: flex-end; }

/* chat-theme preview: the measured swatch colours are dark-theme bubbles, so they apply in dark only [ours] */
html.wa-dark .theme-prev { --wa-bubble-out: var(--theme-out); --chev-bg: var(--theme-out); }
