/* Cleaner reply quotations and hover-only external message controls. */
.chat-message-list .reply-context-card,.chat-message-list .message-reply-card{min-width:0!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:44px!important;margin:0 0 7px!important;padding:7px 10px!important;border:0!important;border-left:3px solid #6d9ff0!important;border-radius:5px!important;background:rgba(128,145,165,.13)!important;box-shadow:none!important;overflow:hidden!important}
.chat-message-list .reply-context-card img,.chat-message-list .reply-context-card video{max-width:58px!important;max-height:50px!important;object-fit:cover!important;border-radius:5px!important}
.chat-message-list .message-with-reply{overflow:visible!important;padding-right:12px!important}
.chat-message-list .message-with-reply .message-reply-actions{position:absolute!important;left:auto!important;right:-37px!important;top:auto!important;bottom:5px!important;transform:none!important;opacity:0!important;pointer-events:none!important;z-index:15!important;transition:opacity .12s ease}
.chat-message-list .message-with-reply.mine .message-reply-actions{right:auto!important;left:-37px!important}
.chat-message-list .message-with-reply:hover .message-reply-actions,.chat-message-list .message-with-reply:focus-within .message-reply-actions,.chat-message-list .message-with-reply.message-menu-open .message-reply-actions{opacity:1!important;pointer-events:auto!important}
.chat-message-list .message-menu-trigger{border:0!important;background:transparent!important;box-shadow:none!important;color:#8993a0!important;font-size:24px!important}
@media(hover:none),(pointer:coarse){.chat-message-list .message-with-reply .message-reply-actions{opacity:.65!important;pointer-events:auto!important}}

/* Match the reference: controls beside the last line, outside the bubble. */
.chat-message-list .message-with-reply > .message-reply-actions{width:28px!important;height:28px!important;display:flex!important;align-items:center!important;justify-content:center!important}
.chat-message-list .message-with-reply > .message-reply-actions::before{content:"";position:absolute;inset:-6px -10px;z-index:-1}
.chat-message-list .message-with-reply .message-menu-trigger{display:flex!important;align-items:center!important;justify-content:center!important;width:28px!important;height:28px!important;line-height:1!important;padding:0!important}

/* Match customer reply cards in the dark team inbox. */
.chat-message-list .message-with-reply .reply-context-card,.chat-message-list .message-with-reply .message-reply-card{border:0!important;border-left:0!important;border-radius:7px!important;background:rgba(128,145,165,.13)!important;color:#fff!important;padding:8px 10px!important}
.chat-message-list .reply-context-avatar{display:none!important}
.chat-message-list .reply-context-copy{border:0!important;padding-left:0!important;gap:4px!important}
.chat-message-list .reply-context-author{display:block!important;color:#fff!important;border-bottom:1px solid #ffffff45!important;padding-bottom:5px!important;margin-bottom:1px!important}
.chat-message-list .reply-context-kind,.chat-message-list .reply-context-caption{color:#fff!important;opacity:1!important}

/* Restore the outgoing reply bubble around quotation and final message. */
.inbox-container .chat-message-list .message-with-reply.mine:has(.reply-context-card){background:#195bca!important;color:#fff!important;padding:10px 13px 13px!important;border-radius:20px!important;min-width:0!important;max-width:min(75%,420px)!important;box-sizing:border-box!important}
.inbox-container .chat-message-list .message-with-reply.mine .reply-context-card{background:rgba(255,255,255,.12)!important;color:#fff!important;border:0!important;border-radius:7px!important;margin:0 0 9px!important;min-width:0!important;width:100%!important;max-width:100%!important;padding:8px 10px!important}
.inbox-container .chat-message-list .message-with-reply.mine .reply-context-author{color:#fff!important;border-bottom:1px solid #ffffff45!important}

/* Equal compact inline previews, about one third of the old 480px photos. */
.inbox-container .chat-message-list .message-with-reply:has(.chat-photo-open){width:fit-content!important;max-width:210px!important}
.inbox-container .chat-message-list .message-with-reply .chat-photo-open{width:180px!important;max-width:180px!important}
.inbox-container .chat-message-list .message-with-reply .chat-photo-open>img{width:180px!important;height:auto!important;max-width:180px!important;max-height:none!important;object-fit:contain!important}
.inbox-container .chat-message-list .message-with-reply img.message-sticker,.inbox-container .chat-message-list .message-with-reply img[alt="Sticker"],.inbox-container .chat-message-list .message-with-reply img[alt="Shared sticker"]{width:auto!important;height:auto!important;max-width:140px!important;max-height:140px!important}

.logo[role="button"],.logo[role="button"] img{cursor:pointer!important}
.logo[role="button"]:focus-visible{outline:2px solid #00c896;outline-offset:4px;border-radius:6px}

.chat-contact-list>.chat-menu-row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 12px;border:0;border-bottom:1px solid #ffffff08;color:inherit;background:transparent;text-align:left;cursor:pointer}.chat-contact-list>.chat-menu-row.selected,.chat-contact-list>.chat-menu-row:hover{background:#ffffff12}.chat-menu-row>span:nth-child(2){flex:1;min-width:0}.chat-menu-row strong,.chat-menu-row small{display:block}.chat-menu-row .chat-contact-meta{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex:none}.chat-row-options{visibility:hidden;opacity:0;pointer-events:none}.chat-menu-row:hover .chat-row-options,.chat-menu-row:focus-within .chat-row-options{visibility:visible;opacity:1;pointer-events:auto}.chat-row-options .conversation-options{position:relative;margin:0}.chat-row-options summary{cursor:pointer;list-style:none;font-size:22px;line-height:22px;padding:0 7px}.chat-row-options summary::-webkit-details-marker{display:none}.chat-row-options .conversation-options-menu{right:0;left:auto;z-index:100;min-width:180px}.chat-row-options:has(details[open]){visibility:visible;opacity:1;pointer-events:auto}@media(hover:none){.chat-row-options{visibility:visible;opacity:1;pointer-events:auto}}

.chat-menu-row .chat-contact-meta{min-width:60px!important;align-items:center!important}.chat-pin-menu{position:relative;display:block}.chat-pin-trigger{display:block;width:26px;padding:0!important;font-size:21px!important;line-height:24px!important;background:transparent!important;border:0!important;color:inherit!important;cursor:pointer}.chat-pin-popup{position:absolute;right:0;top:27px;z-index:100;display:block;width:150px;padding:5px;background:#fff;color:#253039;border:1px solid #d5d8dc;border-radius:8px;box-shadow:0 4px 16px #0003}.chat-pin-popup>button{display:block;width:100%;padding:9px 12px!important;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.chat-pin-popup>button:hover{background:#edf2f7}.chat-row-options:has(.chat-pin-popup){visibility:visible;opacity:1;pointer-events:auto}

.chat-pin-popup{width:150px!important;font-size:13px!important;line-height:1.4!important}.chat-pin-popup>button{font-size:13px!important;line-height:1.4!important;white-space:nowrap!important;padding:8px 10px!important}

/* Pinned conversation color from the supplied reference. */
.chat-contact-list>.chat-menu-row.pinned-chat,
.chat-contact-list>.chat-menu-row.pinned-chat:hover,
.chat-contact-list>.chat-menu-row.pinned-chat.selected{background:#86d97b!important;color:#132b16!important}
.chat-menu-row.pinned-chat strong,.chat-menu-row.pinned-chat small,.chat-menu-row.pinned-chat time,.chat-menu-row.pinned-chat .chat-pin-trigger{color:#132b16!important}
