/* Chat management: editing own messages, deleting for everyone and clearing own history. */
.msg-stack{position:relative}
.message-menu-trigger{
  border:0;background:transparent;color:inherit;opacity:.68;
  width:28px;height:26px;min-width:28px;
  font-size:20px;line-height:1;font-weight:700;
  display:inline-grid;place-items:center;border-radius:9px;
  cursor:pointer;letter-spacing:1px;padding:0;margin:-6px -6px -6px 2px;
}
.message-menu-trigger:hover,.message-menu-trigger:focus-visible{
  opacity:1;outline:2px solid #b8a3de;outline-offset:1px;
}
.msg-actions{flex-wrap:wrap;max-width:100%;margin:7px 0 5px;gap:6px}
.msg-actions button{min-height:38px;white-space:nowrap;padding:9px 11px}
.msg-actions .danger-action{color:#a84354;background:#fff5f7;border-color:#f0c8ce}
.edited-label{font-size:10px;opacity:.7;font-style:italic;margin-right:3px}
.deleted-message{
  display:inline-block;
  font-size:13px;font-style:italic;color:#908597;
  opacity:.9;padding:4px 1px;letter-spacing:0;
}
.mine .deleted-message{color:#eee5fd}
.manage-room-info{
  display:flex;flex-direction:column;gap:6px;
  border-radius:14px;padding:15px;background:#f6f2f9;
  margin-bottom:17px;
}
.manage-room-info strong{font-size:15px}
.manage-room-info span{font-size:12px;color:#877a93;line-height:1.5}
.destructive-option{
  display:flex;align-items:center;justify-content:center;gap:9px;
  width:100%;min-height:49px;border:1px solid #e9bac5;border-radius:14px;
  background:#fff4f6;color:#a43850;cursor:pointer;font-size:13px;font-weight:750;
}
.destructive-option svg{height:18px;width:18px;stroke:currentColor;fill:none;stroke-width:1.8}
.destructive-option:hover{background:#fde9ee}
.destructive-explainer,.edit-explainer{
  font-size:12px!important;line-height:1.6!important;
  color:#8d8292!important;margin:12px 2px 4px!important;
}
.confirm-danger{
  border:1px solid #eed8df;border-radius:15px;
  background:#fff7f8;padding:16px;margin:0 0 18px;color:#624d58;
}
.confirm-danger strong{font-size:15px;line-height:1.35;color:#a43850}
.confirm-danger p{font-size:12px!important;line-height:1.65!important;color:#806e78!important;margin:9px 0 0!important}
.destructive-primary{
  display:block;width:100%;border:0;border-radius:13px;
  background:#b54257;color:#fff;font-weight:760;font-size:14px;
  cursor:pointer;min-height:48px;padding:12px 17px;
}
.destructive-primary:hover{background:#9d3549}
.confirm-cancel{display:block;width:100%;margin-top:10px;min-height:46px}
.edit-textarea{
  box-sizing:border-box;resize:vertical;width:100%;
  min-height:130px;max-height:46vh;
  font:inherit;font-size:16px!important;line-height:1.5;
  padding:13px 14px;margin-bottom:15px;
}
.edit-textarea:focus{outline:2px solid #bea9e7;outline-offset:1px}
@media(max-width:700px){
  .message-menu-trigger{width:32px;height:32px;min-width:32px;font-size:21px}
  .msg-actions{gap:5px}
  .msg-actions button{font-size:12px;padding:9px 11px;min-height:39px}
  .edit-textarea{min-height:115px}
}
@media(prefers-reduced-motion:reduce){
  .destructive-option,.destructive-primary,.message-menu-trigger{transition:none}
}

/* Don't let status toasts obscure confirmation and Cancel on phones. */
body:has(.modal-cover) .toast{
  top:calc(18px + env(safe-area-inset-top,0px));
  bottom:auto;
  z-index:61;
}
/* Respect the existing application-wide dark theme. */
html[data-theme="dark"] .manage-room-info{
  background:#273028;color:#e9efe4;
}
html[data-theme="dark"] .manage-room-info span,
html[data-theme="dark"] .destructive-explainer,
html[data-theme="dark"] .edit-explainer{color:#b0b9a8!important}
html[data-theme="dark"] .confirm-danger{
  background:#37282c;border-color:#67414c;color:#f2e0e4;
}
html[data-theme="dark"] .confirm-danger strong{color:#ffc1ce}
html[data-theme="dark"] .confirm-danger p{color:#d3b8c0!important}
html[data-theme="dark"] .destructive-option{
  background:#422d33;border-color:#74414f;color:#ffc1cc;
}
html[data-theme="dark"] .msg-actions .danger-action{
  background:#4c333c;border-color:#784650;color:#ffd6df;
}
html[data-theme="dark"] .deleted-message{color:#aeb5a8}
html[data-theme="dark"] .mine .deleted-message{color:#ecf3e5}


.destructive-both{margin-top:9px;background:#b94459;color:#fff;border-color:#b94459}
.destructive-both svg{stroke:#fff}
.destructive-both:hover{background:#a3374c;border-color:#a3374c}
.destructive-both:focus-visible,.destructive-option:focus-visible{outline:3px solid #eab3c1;outline-offset:3px}
html[data-theme="dark"] .destructive-both{background:#a9435b;border-color:#b44b64;color:#fff}
html[data-theme="dark"] .destructive-both:hover{background:#bf526b}

.contact-remove-option{margin-top:11px;color:#746071!important;background:#f5edf3!important;border-color:#e1cfda!important}
.contact-remove-option:hover{background:#eddfe8!important}
.blocked-contact-section{padding:14px;border-radius:16px;background:#f6f1f7;margin:14px 0}
.blocked-contact-section>strong{display:block;font-size:13px;margin-bottom:11px}
.blocked-contact-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid #e7dfea;font-size:12px}
.contact-restore,.member-remove-contact{padding:8px 10px;border-radius:9px;border:1px solid #c6b5dd;color:#65518f;background:#fffdfb;font-size:11px;font-weight:650;cursor:pointer}
.member-remove-contact{margin-left:auto;flex-shrink:0}
.blocked-chat-note{font-size:11px;color:#b24e67;font-weight:750}
.composer [disabled]{opacity:.45;cursor:not-allowed}
html[data-theme="dark"] .blocked-contact-section{background:#2c292e}
html[data-theme="dark"] .blocked-contact-row{border-color:#474049}
html[data-theme="dark"] .contact-remove-option{color:#e8dce3!important;background:#473943!important}
@media(max-width:700px){.member-remove-contact{min-height:35px}}
