/* v519 shared iOS action sheet (chatSheet, portalDialog/portalConfirm, location + organizer sheets):
   floating sheet inset from the screen edges with corners concentric to the display corners
   (radius = display radius - inset), plain title with the X top right, one grouped list instead of boxes in a box. */
:root{--fc-display-radius:55px;--fc-sheet-inset:8px;--fc-sheet-outer:calc(var(--fc-display-radius) - var(--fc-sheet-inset));--fc-sheet-pad:16px;--fc-sheet-inner:calc(var(--fc-sheet-outer) - var(--fc-sheet-pad))}
html.virtual-phone-client{--fc-display-radius:44px}
@media(max-width:650px){
 html body :is(dialog.chat-action-sheet:not(.chat-profile-full),dialog.portal-dialog,dialog.panel-confirm-dialog,dialog.location-settings-sheet,dialog.be-removed-sheet)[open]{left:var(--fc-sheet-inset)!important;right:var(--fc-sheet-inset)!important;bottom:var(--fc-sheet-inset)!important;top:auto!important;width:auto!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;border:0!important;border-radius:var(--fc-sheet-outer)!important;padding:18px var(--fc-sheet-pad) max(var(--fc-sheet-pad),calc(var(--app-safe-bottom,env(safe-area-inset-bottom,0px)) - 4px))!important;background:rgba(255,248,250,.97)!important;-webkit-backdrop-filter:blur(30px) saturate(180%);backdrop-filter:blur(30px) saturate(180%);box-shadow:0 -4px 40px rgba(64,19,40,.2)!important}
 html body :is(dialog.chat-action-sheet:not(.chat-profile-full):not(.chat-sheet-contained),dialog.portal-dialog,dialog.panel-confirm-dialog,dialog.location-settings-sheet,dialog.be-removed-sheet)[open]{position:fixed!important}
}
/* plain title row: no panel around it, X top right */
html body dialog.fc-action-sheet>header,html body dialog.chat-action-sheet:not(.chat-profile-full)>header{display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:34px;margin:0 0 14px!important;padding:0 0 0 6px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;position:static!important}
html body dialog.chat-action-sheet:not(.chat-profile-full)>header h2{margin:0;font-size:19px;font-weight:700;letter-spacing:-.01em;color:#3a1622}
html body dialog.chat-action-sheet:not(.chat-profile-full):not(.has-bell-x)>header>button[aria-label]{flex:none;display:grid!important;place-items:center;width:32px!important;height:32px!important;min-width:0!important;min-height:0!important;margin:0 0 0 auto!important;padding:0!important;border:0!important;border-radius:50%!important;background:rgba(100,22,43,.08)!important;color:#64162b!important;font-size:19px!important;line-height:1!important;box-shadow:none!important;order:2}
/* one grouped list with dividers */
html body .fc-sheet-list,html body dialog.chat-action-sheet .chat-send-modes{display:flex!important;flex-direction:column;gap:0!important;border-radius:var(--fc-sheet-inner,22px);background:#fff;overflow:hidden}
html body :is(.fc-sheet-list,.chat-send-modes)>.chat-photo-choice{display:flex!important;align-items:center;gap:14px;width:100%;min-height:54px;margin:0!important;padding:13px 18px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:left;font-size:16.5px;color:#3a1622}
html body :is(.fc-sheet-list,.chat-send-modes)>.chat-photo-choice+.chat-photo-choice{box-shadow:inset 0 .5px 0 rgba(100,22,43,.14)!important}
html body :is(.fc-sheet-list,.chat-send-modes)>.chat-photo-choice:active{background:rgba(100,22,43,.06)!important}
html body .fc-sheet-list>.chat-photo-choice svg{flex:none;width:24px;height:24px;color:#c82040}
html body .chat-send-modes>.chat-photo-choice{flex-direction:column;align-items:flex-start;gap:2px}
/* reaction fallback: emojis in one row, no boxes */
html body dialog.chat-action-sheet .chat-reaction-picker{display:flex!important;justify-content:space-between;gap:0!important;padding:4px 6px;border-radius:var(--fc-sheet-inner,22px);background:#fff}
html body dialog.chat-action-sheet .chat-reaction-picker>button{width:48px!important;height:48px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;font-size:28px!important}
/* portal dialogs: plain title, no inner panel */
@media(max-width:650px){html body :is(dialog.portal-dialog,dialog.panel-confirm-dialog)>form{border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important}html body :is(dialog.portal-dialog,dialog.panel-confirm-dialog) h2{font-size:19px;margin:2px 6px 8px}}

/* v519 iMessage-style tapback: long-press a message */
.chat-tapback-layer{position:fixed;inset:0;cursor:pointer;-webkit-tap-highlight-color:transparent;z-index:2147483000;background:rgba(40,10,20,.10);animation:fc-tb-fade .16s ease-out}
.chat-tapback-layer.is-closing{opacity:0;transition:opacity .15s}
.chat-tapback,.chat-tapback-menu{position:fixed;box-sizing:border-box;background:rgba(255,250,252,.86);-webkit-backdrop-filter:blur(24px) saturate(180%);backdrop-filter:blur(24px) saturate(180%);border:.5px solid rgba(255,255,255,.75);box-shadow:0 12px 34px rgba(64,19,40,.24),inset 0 1px 0 rgba(255,255,255,.9);animation:fc-tb-pop .22s cubic-bezier(.2,.9,.3,1.25)}
.chat-tapback{display:flex;gap:2px;padding:5px;border-radius:999px}
.chat-tapback button{display:grid;place-items:center;width:44px;height:44px;min-height:0;margin:0;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;font-size:26px;line-height:1;transition:transform .12s}
.chat-tapback button:is(:hover,:focus-visible){background:rgba(100,22,43,.08);outline:none}
.chat-tapback button:active{transform:scale(1.25)}
.chat-tapback-menu{min-width:208px;border-radius:20px;overflow:hidden;display:flex;flex-direction:column}
.chat-tapback-menu button{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:46px;margin:0;padding:0 16px;border:0;border-radius:0;background:transparent;box-shadow:none;font:inherit;font-size:16px;color:#3a1622;text-align:left}
.chat-tapback-menu button+button{box-shadow:inset 0 .5px 0 rgba(100,22,43,.16)}
.chat-tapback-menu button svg{width:20px;height:20px}
.chat-tapback-menu button.is-destructive{color:#d70015}
.chat-tapback-menu button:is(:active,:focus-visible){background:rgba(100,22,43,.07);outline:none}
.message-wrap.is-tapback-source>p{transform:scale(1.03);transition:transform .18s}
:is(.product-chat,.chrome-message-panel) .message-wrap>p{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
@keyframes fc-tb-fade{from{opacity:0}}
@keyframes fc-tb-pop{from{opacity:0;transform:scale(.6)}}
/* old per-message react (+) and trash buttons: visually hidden, still reachable for VoiceOver / keyboard */
html body :is(.product-chat,.chrome-message-panel) .message-wrap .chat-delete,html body :is(.product-chat,.chrome-message-panel) .message-wrap .chat-reaction-control:has(.chat-add-reaction){position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;border:0!important;white-space:nowrap}
/* reactions = small badges on the bubble's top corner (received: bottom right, sent: bottom left), like iMessage tapbacks */
html body :is(.product-chat,.chrome-message-panel) .message-wrap:not(.message-deleted){position:relative}
html body :is(.product-chat,.chrome-message-panel) .message-wrap .reactions{position:absolute!important;z-index:1;top:auto!important;bottom:-12px!important;right:-6px;left:auto;margin:0!important;gap:3px;flex-wrap:nowrap;justify-content:flex-end;pointer-events:auto}
html body :is(.product-chat,.chrome-message-panel) .message-wrap.mine .reactions{left:-6px;right:auto;justify-content:flex-start}
html body :is(.product-chat,.chrome-message-panel) .message-wrap:has(.reactions :is(.chat-reaction-control:not(:has(.chat-add-reaction)),.reaction-count)){margin-bottom:14px}
html body :is(.product-chat,.chrome-message-panel) .message-wrap .reactions :is(.chat-reaction-control:not(:has(.chat-add-reaction)),.reaction-count){display:inline-flex;align-items:center;gap:2px;min-width:0!important;min-height:0!important;height:26px;padding:0 8px!important;border-radius:13px!important;font-size:14px!important;line-height:1;color:#64162b;background:rgba(255,250,252,.96)!important;border:1.5px solid #fff!important;box-shadow:0 2px 8px rgba(64,19,40,.16)!important}
@media(prefers-reduced-motion:reduce){.chat-tapback,.chat-tapback-menu,.chat-tapback-layer{animation:none}}
