.ms-shell,
.ms-shell * {
  -webkit-tap-highlight-color: transparent;
}

.ms-shell {
  --ms-workspace-header-height: 51px;
  --ms-workspace-footer-height: 38px;
  display: grid;
  grid-template-columns: var(--ms-list-width, clamp(230px, 24vw, 350px)) minmax(0, 1fr);
  gap: 5px;
  position: relative;
  height: calc(100dvh - 40px);
  min-height: 500px;
  overflow: visible;
}

.ms-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  transform: translateX(-50%);
  z-index: 30;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}

.ms-resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(35, 120, 220, 0);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.ms-resize-handle:hover::before,
.ms-shell.is-resizing .ms-resize-handle::before {
  background: rgba(35, 120, 220, 0.55);
  box-shadow: 0 0 10px rgba(35, 120, 220, 0.24);
}

.ms-shell.is-resizing,
.ms-shell.is-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.ms-panel {
  min-width: 0;
  min-height: 0;
  background: rgb(30 40 60 / 15%);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.50);
}

.ms-panel--list,
.ms-panel--chat,
.ms-chat {
  display: flex;
  flex-direction: column;
}

.ms-list-head,
.ms-chat-head,
.ms-composer {
  flex: 0 0 auto;
}

.ms-list-head {
  display: flex;
  box-sizing: border-box;
  height: var(--ms-workspace-header-height);
  min-height: var(--ms-workspace-header-height);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 10px;
}

.ms-list-head, .ms-chat-head {
    border-bottom: 1px solid rgb(35 120 220 / 15%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.50);
}

.ms-title {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.ms-head-actions,
.ms-chat-actions,
.ms-row-actions,
.ms-modal-actions,
.ms-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ms-list-head .ms-head-actions .ms-icon {
  width: 23px;
  height: 23px;
}

.ms-icon-btn,
.ms-back-btn,
.ms-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  box-shadow: 0 0 0 1px rgb(35 120 220 / 20%);
    border: none;
  border-radius: var(--br);
  background: transparent;
  color: #fff;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .3s ease, opacity .3s ease;
}

.ms-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: #E4E4E4;
}

.ms-send-btn .ms-icon {
    width: 30px;
    height: 30px;
    color: #2378dc;
    stroke: currentColor;
    background: transparent;
    border: none;
    transition: color .3s ease, stroke .3s ease, opacity .3s ease;
}

.ms-send-btn .ms-icon * {
    transition: stroke .3s ease, color .3s ease, opacity .3s ease;
}

.ms-icon-btn:hover,
.ms-back-btn:hover,
.ms-send-btn:hover {
  background: rgb(35 120 220 / 20%);
}

.ms-icon-btn.is-muted {
  color: #ff8a7a;
  border-color: rgba(255, 99, 71, 0.32);
}

.ms-search-wrap {
  padding: 6px 10px;
}

.ms-search,
.ms-modal input,
.ms-modal select,
.ms-modal textarea {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.ms-search:-webkit-autofill,
.ms-modal input:-webkit-autofill,
.ms-modal select:-webkit-autofill,
.ms-modal textarea:-webkit-autofill {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
  background-color: rgb(10 25 40) !important;
  background-image: none !important;
  box-shadow: 0 0 0 1000px rgb(10 25 40) inset, 0 0 0 1px rgb(35 120 220 / 20%) !important;
  transition: background-color 9999s ease-out, color 9999s ease-out;
}

.ms-search:-webkit-autofill:focus,
.ms-modal input:-webkit-autofill:focus,
.ms-modal select:-webkit-autofill:focus,
.ms-modal textarea:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px rgb(10 25 40) inset, 0 0 0 1px rgb(35 120 220 / 40%) !important;
}

.ms-search:-moz-autofill,
.ms-modal input:-moz-autofill,
.ms-modal select:-moz-autofill,
.ms-modal textarea:-moz-autofill {
  background-color: rgb(10 25 40) !important;
  color: #fff !important;
  caret-color: #fff !important;
}

.ms-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}

.ms-conv {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  position: relative;
  padding: 3px 6px;
  border-radius: var(--br);
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}

.ms-invite {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  margin: 4px;
  border-radius: var(--br);
  background: #263248;
  border: 1px solid rgba(0, 220, 255, 0.18);
}

.ms-invite-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.ms-conv:hover,
.ms-conv.is-active {
  background: #1d3255;
  border-color: rgba(85, 129, 255, 0.22);
}

.ms-conv.is-removed {
  opacity: .78;
}

.ms-conv.is-pinned {
  box-shadow: inset 2px 0 0 rgba(0, 220, 255, .42);
}

.ms-row-delete {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 99, 71, .35);
  border-radius: var(--br);
  background: #4d1f1b;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
}

.ms-avatar,
.ms-chat-avatar,
.ms-contact-avatar {
  position: relative;
  background: transparent;
}

.ms-avatar-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.ms-avatar-link:focus-visible {
  outline: 2px solid rgba(0, 220, 255, .7);
  outline-offset: 2px;
}

.ms-avatar,
.ms-chat-avatar {
  width: 36px;
  height: 36px;
}

.ms-contact-avatar,
.ms-message-avatar {
  width: 30px;
  height: 30px;
}
.ms-upload-avatar {
    width: 42px;
    height: 42px;
}

.ms-avatar img,
.ms-chat-avatar img,
.ms-upload-avatar img,
.ms-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

.ms-presence {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #737373;
  box-shadow: 0 0 2px 2px #202020;
}

.ms-presence.is-online {
    background: #36c263;
    box-shadow: 0 0 2px 2px rgb(54 194 99 / 40%);
}

.ms-conv-main,
.ms-chat-meta,
.ms-message-main,
.ms-contact-main,
.ms-upload-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ms-chat-meta {
    padding: 5px 15px;
    border-radius: var(--br);
    transition: background .3s ease;
}
.ms-chat-meta:hover {
    background: rgb(35 120 220 / 20%);
}

.ms-chat-meta:focus-visible .ms-chat-title {
  color: #7fd7ff;
}

.ms-chat-meta:focus-visible {
  outline: 2px solid rgba(0, 220, 255, .7);
  outline-offset: 2px;
}

.ms-upload-main {
    gap: 5px;
}

.ms-conv-title,
.ms-chat-title,
.ms-contact-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.ms-contact-main {
    font-size: 12px;
    font-weight: 400;
    gap: 2px;
}

.ms-conv-title,
.ms-chat-title {
  font-weight: 400;
}
.ms-conv-title {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
}

.ms-conv-preview,
.ms-chat-status,
.ms-contact-sub,
.ms-message-time,
.ms-empty-title {
  color: #a6a6a6;
  font-size: 11px;
  letter-spacing: 0;
}
.ms-empty-title {
    font-size: 16px;
    font-weight: 400;
}

.ms-conv-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0px;
}

.ms-conv-tools {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: auto;
  min-width: 24px;
  height: 24px;
}

.ms-conv-message-status-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
}

.ms-conv-message-status-wrap:empty {
  display: none;
}

.ms-conv-message-status {
  flex: 0 0 auto;
}

.ms-conv-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: var(--br);
  background: transparent;
  color: #b8b8b8;
  cursor: pointer;
}

.ms-conv-menu-btn .ms-icon {
  width: 18px;
  height: 18px;
}

.ms-conv-menu-btn:hover,
.ms-conv-tools.is-open .ms-conv-menu-btn {
  background: rgb(35 120 220 / 20%);
  border-color: rgba(85, 129, 255, .26);
  color: #fff;
}

.ms-conv-menu-layer {
  position: absolute;
  inset: 0;
  z-index: 1300;
  overflow: visible;
  pointer-events: none;
}

/* Profile notification choices must be above the profile modal (1400). */
.ms-conv-menu-layer.is-over-profile {
  z-index: 1450;
}

.ms-conv-menu {
  position: absolute;
  top: var(--ms-menu-top, 0);
  left: var(--ms-menu-left, 0);
  z-index: 1;
  box-sizing: border-box;
  pointer-events: auto;
  width: 180px;
  padding: 5px;
  border: 1px solid rgba(85, 129, 255, .24);
  border-radius: var(--br);
  background: var(--bg-menu);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.ms-conv-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s;
}

.ms-conv-menu.is-closing {
  opacity: 0;
  visibility: visible;
  transform: translateY(-6px) scale(.98);
}

.ms-conv-menu-sub {
  position: relative;
}

.ms-conv-menu-sub::before {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: 10px;
  height: 100%;
}

.ms-conv-menu-sub.is-left::before {
  right: 100%;
  left: auto;
}

.ms-conv-menu-sub.is-stacked {
  position: static;
}

.ms-conv-menu-sub.is-stacked::before {
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
}

.ms-conv-sub-trigger {
  padding-right: 20px;
}

.ms-conv-sub-trigger .ms-icon--chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: #9d9d9d;
  transition: transform .18s ease, color .18s ease;
}

.ms-conv-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 2;
  box-sizing: border-box;
  width: 180px;
  padding: 5px;
  border: 1px solid rgba(85, 129, 255, .24);
  border-radius: var(--br);
  background: var(--bg-menu);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-8px) scale(.98);
  transform-origin: top left;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.ms-conv-menu-sub.is-left .ms-conv-submenu {
  right: 100%;
  left: auto;
  transform: translateX(8px) scale(.98);
  transform-origin: top right;
}

.ms-conv-menu-sub.is-stacked .ms-conv-submenu {
  position: absolute;
  top: calc(100% + 5px);
  right: auto;
  left: 0;
  width: 100%;
  transform: translateY(-6px) scale(.98);
  transform-origin: top center;
}

.ms-conv-menu-sub.is-open .ms-conv-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear 0s;
}

.ms-conv-menu-sub.is-open .ms-conv-sub-trigger {
  background: var(--bg-hover-menu);
}

.ms-conv-menu-sub.is-open .ms-conv-sub-trigger .ms-icon--chevron {
  color: #fff;
  transform: translateX(2px);
}

.ms-conv-menu-sub.is-left .ms-conv-sub-trigger .ms-icon--chevron {
  transform: rotate(180deg);
}

.ms-conv-menu-sub.is-open.is-left .ms-conv-sub-trigger .ms-icon--chevron {
  transform: rotate(180deg) translateX(2px);
}

.ms-conv-menu-sub.is-stacked .ms-conv-sub-trigger .ms-icon--chevron {
  transform: rotate(90deg);
}

.ms-conv-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 6px 8px;
  border: 0;
  border-radius: calc(var(--br) - 2px);
  background: transparent;
  color: #f1f1f1;
  font-size: 12px;
  line-height: 16px;
  text-align: left;
  cursor: pointer;
}

.ms-conv-menu-item .ms-icon {
  width: 18px;
  height: 18px;
}

.ms-conv-menu-item.is-danger .ms-icon {
  width: 18px;
  height: 18px;
}

.ms-conv-menu-item .ms-icon--chevron {
  width: 14px;
  height: 14px;
}

.ms-menu-label {
  min-width: 0;
  flex: 1 1 auto;
}

.ms-conv-menu-item:hover {
  background: var(--bg-hover-menu);
}

.ms-conv-menu-item.is-danger {
  color: #ffb1a8;
}

.ms-conv-menu-sep {
  height: 1px;
  margin: 5px 2px;
  background: rgba(255, 255, 255, .08);
}

.ms-unread,
.ms-nav-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #008511;
    color: #fff;
    font-weight: 500;
    letter-spacing: .05rem;
}
.ms-unread {
    position: absolute;
    top: -7px;
    right: -5px;
    min-width: 15px;
    height: 14px;
    line-height: 1;
    font-size: 10px;
}

.ms-chat-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-chat {
  height: 100%;
  min-height: 0;
  position: relative;
}

.ms-chat-drop-zone {
  position: absolute;
  inset: calc(var(--ms-workspace-header-height) + 8px) 10px 8px;
  z-index: 45;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 2px dashed rgba(55, 145, 255, .72);
  border-radius: calc(var(--br) + 4px);
  background: rgba(12, 25, 43, .78);
  box-shadow: inset 0 0 34px rgba(35, 120, 220, .12), 0 0 24px rgba(0, 0, 0, .2);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: none;
  opacity: 0;
  transform: scale(.992);
  transition: opacity .16s ease, transform .16s ease, border-color .16s ease;
}

.ms-chat-drop-zone[hidden] {
  display: none;
}

.ms-chat-drop-zone.is-visible {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(72, 161, 255, .95);
}

.ms-chat-drop-zone__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  max-width: min(360px, 82%);
  padding: 22px 28px;
  border-radius: calc(var(--br) + 2px);
  background: rgba(18, 34, 55, .88);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .24);
  color: #fff;
  text-align: center;
}

.ms-chat-drop-zone__card strong {
  font-size: 16px;
  font-weight: 600;
}

.ms-chat-drop-zone__card > span:last-child {
  color: rgba(220, 228, 240, .68);
  font-size: 12px;
}

.ms-chat-drop-zone__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(35, 120, 220, .18);
  color: #4b9cff;
  animation: ms-chat-drop-pulse 1.25s ease-in-out infinite;
}

.ms-chat-drop-zone__icon .ms-icon {
  width: 25px;
  height: 25px;
}

@keyframes ms-chat-drop-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(35, 120, 220, .18); }
  50% { transform: translateY(-3px); box-shadow: 0 0 0 9px rgba(35, 120, 220, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ms-chat-drop-zone,
  .ms-chat-drop-zone__icon {
    animation: none;
    transition: none;
  }
}

.ms-chat-head {
    display: flex;
    box-sizing: border-box;
    height: var(--ms-workspace-header-height);
    min-height: var(--ms-workspace-header-height);
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 10px;
    padding: 4px 0;
}
.ms-chat-head-left {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding-left: 10px;
}
.ms-chat-actions {
    flex: 0 0 auto;
    padding-right: 10px;
}

.ms-chat-head .ms-chat-meta {
  box-sizing: border-box;
  width: fit-content;
  max-width: 100%;
  flex: 0 1 auto;
  overflow: hidden;
}

.ms-chat-head .ms-chat-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-messages-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ms-messages-viewport.is-message-list-loading .ms-messages {
  visibility: hidden;
}

.ms-initial-route-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  box-sizing: border-box;
  padding: 18px 14px;
  background: #111821;
  overflow: hidden;
  pointer-events: none;
}

.ms-messages-viewport.is-message-list-loading .ms-initial-route-loading {
  display: flex;
}

.ms-route-skeleton-row {
  display: flex;
  justify-content: flex-start;
}

.ms-route-skeleton-row.is-outgoing {
  justify-content: flex-end;
}

.ms-route-skeleton-bubble {
  position: relative;
  display: block;
  width: min(62%, 360px);
  height: 58px;
  overflow: hidden;
  border-radius: 18px 18px 18px 6px;
  background: rgba(35, 52, 76, 0.56);
}

.ms-route-skeleton-row.is-outgoing .ms-route-skeleton-bubble {
  border-radius: 18px 18px 6px 18px;
  background: rgba(38, 55, 82, 0.62);
}

.ms-route-skeleton-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 24%,
    rgba(104, 132, 170, 0.34) 50%,
    transparent 76%
  );
  background-repeat: no-repeat;
  transform: translate3d(-125%, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
  animation: ms-message-skeleton-wave 1.45s linear infinite;
}

.ms-route-skeleton-bubble.is-wide {
  width: min(76%, 430px);
  height: 76px;
}

.ms-route-skeleton-bubble.is-medium {
  width: min(58%, 330px);
  height: 62px;
}

.ms-route-skeleton-bubble.is-short {
  width: min(38%, 220px);
  height: 46px;
}

@keyframes ms-message-skeleton-wave {
  0% { transform: translate3d(-125%, 0, 0); }
  100% { transform: translate3d(125%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .ms-route-skeleton-bubble::after {
    animation: none;
  }
}

.ms-messages {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-messages.has-message-items::before {
  content: "";
  margin-top: auto;
}
.ms-messages.is-selection-mode {
    gap: 2px;
}

.ms-day-anchor {
  height: 0;
  min-height: 0;
  margin-bottom: -10px;
  padding: 0;
  pointer-events: none;
}

.ms-day-sep {
  position: sticky;
  top: 3px;
  z-index: 2;
  align-self: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgb(37 58 77 / 80%);
  color: #a6a6a6;
  font-size: 11px;
  line-height: normal;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .10);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.ms-day-sep.pre-sticky {
    transform: translateY(-40px);
}
.ms-day-sep.pre-sticky.is-sticky-active {
    transform: translateY(0);
  cursor: pointer;
  pointer-events: auto;
}

.ms-day-sep.is-sticky-active:hover {
  background: rgb(37 58 77 / 100%);
  color: #f1f1f1;
}

.ms-history-loader {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgb(35 120 220 / 28%);
  background: rgb(35 120 220 / 16%);
  color: #8fbfff;
  font-size: 11px;
}

.ms-history-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgb(35 120 220 / 28%);
  border-top-color: #2378dc;
  border-radius: 50%;
  animation: ms-history-spin .75s linear infinite;
}

@keyframes ms-history-spin {
  to {
    transform: rotate(360deg);
  }
}

.ms-new-messages-divider {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: #8fbfff;
  font-size: 11px;
  letter-spacing: 0;
  opacity: 1;
  transition: opacity .2s ease;
}

.ms-new-messages-divider::before,
.ms-new-messages-divider::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid rgba(143, 191, 255, .55);
}

.ms-new-messages-divider span {
  flex: 0 0 auto;
}

.ms-new-messages-divider.is-hiding {
  opacity: 0;
}

.ms-unread-jump {
  position: absolute;
  right: 12px;
  bottom: 12px;
  margin: 0;
  overflow-anchor: none;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 34px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid rgba(85, 129, 255, .28);
  border-radius: var(--br);
  background: rgb(35 120 220 / 20%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease;
  pointer-events: none;
}

.ms-unread-jump.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ms-unread-jump:hover {
  background: rgb(35 120 220 / 80%);
  border-color: rgba(0, 220, 255, .35);
}

.ms-unread-jump .ms-icon {
  width: 18px;
  height: 18px;
}

.ms-unread-jump.is-scroll-only {
  width: 34px;
  min-height: 34px;
}

.ms-unread-jump-count {
  min-width: 16px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: #008511;
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.ms-unread-jump-count[hidden] {
  display: none;
}

.ms-system-message {
  position: relative;
  isolation: isolate;
  align-self: center;
  max-width: 82%;
  color: #9d9d9d;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.ms-message {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, auto);
  gap: 6px;
  max-width: min(70%, 720px);
  align-self: flex-start;
}

.ms-message.has-message-avatar {
  grid-template-columns: 30px minmax(0, auto);
}

.ms-message.is-mine {
  grid-template-columns: minmax(0, auto);
  align-self: flex-end;
}

.ms-message.is-mine .ms-message-avatar {
  display: none;
}

.ms-message-avatar {
    position: relative;
    background: transparent;
}

.ms-message-avatar img {
    border-radius: 8px;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ms-bubble {
    position: relative;
    min-width: 150px;
    background: var(--bg-bubble);
    border-radius: 10px 10px 10px 0;
    padding: 10px;
}

.ms-bubble::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 10px;
    height: 12px;
    background: var(--bg-bubble);
    clip-path: polygon(100% 0, 110% 110%, 0% 100%);
}

.ms-message.is-mine .ms-bubble {
    background: var(--bg-bubble-mine);
    border-radius: 10px 10px 0 10px;
}

.ms-message.is-mine .ms-bubble::before {
    right: -10px;
    left: auto;
    background: var(--bg-bubble-mine);
    clip-path: polygon(0 0, 100% 100%, -10% 110%);
}

.ms-message-name {
  padding-bottom: 8px;
  color: #7fd7ff;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .05rem;
}

.ms-message-name.ms-user-quick-trigger {
  display: block;
  width: fit-content;
  margin: 0;
  padding: 0 0 8px;
  border: 0;
  background: transparent;
  font: inherit;
    font-size: 12px;
    font-weight: 400;
  color: #7fd7ff;
  letter-spacing: .05rem;
  text-align: left;
  cursor: pointer;
}

.ms-user-quick-trigger {
  cursor: pointer;
}

.ms-user-quick-popover {
  position: absolute;
  z-index: 2300;
  box-sizing: border-box;
  max-width: calc(100vw - 20px);
  max-height: min(520px, calc(100vh - 20px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(75, 150, 255, .15);
  border-radius: 8px;
  background: rgba(12, 24, 36, .7);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .46);
  backdrop-filter: blur(5px);
  opacity: 0;
  transform: scale(.88);
  transform-origin: var(--ms-user-quick-origin-x, 50%) var(--ms-user-quick-origin-y, 50%);
  pointer-events: none;
  transition:
    opacity .16s ease,
    transform .2s cubic-bezier(.2, .82, .24, 1);
  will-change: opacity, transform;
}

.ms-user-quick-popover.is-open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.ms-user-quick-popover.is-closing {
  opacity: 0;
  transform: scale(.88);
  pointer-events: none;
}

.ms-user-quick-popover-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
}

.ms-user-quick-popover-close .ms-icon {
  width: 18px;
  height: 18px;
}

.ms-user-quick-popover-body {
  min-width: 0;
}

.ms-user-quick-popover .ms-user-quick-card {
  min-width: 0;
  width: 100%;
  padding-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .ms-user-quick-popover {
    transition: none;
  }
}

.ms-user-quick-loading {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, .58);
}

.ms-user-quick-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(95, 172, 255, .18);
  border-top-color: #2d8cff;
  border-radius: 50%;
  animation: ms-user-quick-spin .75s linear infinite;
}

@keyframes ms-user-quick-spin {
  to { transform: rotate(360deg); }
}

.ms-user-quick-card {
  min-width: min(440px, 82vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0 2px;
}

.ms-user-quick-avatar {
  width: 70px;
  height: 70px;
  margin-bottom: 5px;
  border-radius: 10px;
  object-fit: contain;
}

.ms-user-quick-avatar-wrap {
  position: relative;
  display: inline-flex;
  margin-bottom: 5px;
}

.ms-user-quick-avatar-wrap .ms-user-quick-avatar {
  margin-bottom: 0;
}

.ms-user-quick-avatar-wrap .ms-presence {
  right: -2px;
  bottom: 3px;
  width: 10px;
  height: 10px;
}

.ms-user-quick-name {
  max-width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-user-quick-presence,
.ms-user-quick-self {
  color: rgba(255, 255, 255, .48);
  font-size: 12px;
}

.ms-user-quick-presence.is-online {
  color: #36c263;
}

.ms-user-quick-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.ms-user-quick-action {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    border: 1px solid rgba(75, 150, 255, .2);
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    cursor: pointer;
}

.ms-user-quick-action svg {
  width: 25px;
  height: 25px;
}

.ms-user-quick-action[data-ms-quick-chat],
.ms-user-quick-action[data-ms-quick-chat] .ms-icon {
  color: #72bfff;
  stroke: currentColor;
}

.ms-user-quick-action[data-ms-quick-call],
.ms-user-quick-action[data-ms-quick-call] .ms-icon {
  color: #4fd497;
  stroke: currentColor;
}

.ms-user-quick-action:hover {
  background: rgba(45, 140, 255, .13);
}

.ms-user-quick-action.is-danger { color: #ff7474; }

.ms-user-quick-action:disabled,
.ms-user-quick-action.is-disabled {
  opacity: .42;
  cursor: default;
}

.ms-message-forwarded {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin: 0 0 7px;
    color: gray;
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
}

.ms-message-tools {
    position: absolute;
    top: 0;
    right: -25px;
    z-index: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.ms-message:hover .ms-bubble::after {
  content: "";
  position: absolute;
  top: 0;
  right: -28px;
  width: 32px;
  height: 100%;
}

.ms-message.is-mine:hover .ms-bubble::after {
  right: auto;
  left: -28px;
}

.ms-message.is-mine .ms-message-tools {
  right: auto;
  left: -25px;
}

.ms-message-tool-btn {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--br);
  background: rgba(255, 255, 255, .02);
  color: #aeb8c8;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.ms-message:hover .ms-message-tools,
.ms-message-tools:hover,
.ms-message-tools:focus-within,
.ms-message-tools.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ms-message-tool-btn:hover,
.ms-message-tool-btn.is-open {
  background: #1d3255;
  border-color: rgba(85, 129, 255, .20);
  color: #fff;
}

.ms-message-tool-btn .ms-icon {
  width: 16px;
  height: 16px;
}

/* Слой меню сообщений вынесен за bubble, чтобы меню не обрезалось скроллом чата. */
.ms-message-menu-layer {
  position: absolute;
  inset: 0;
  z-index: 1350;
  overflow: visible;
  pointer-events: none;
}

.ms-message-action-popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  pointer-events: auto;
  transform-origin: center;
  animation: ms-message-menu-reveal .2s cubic-bezier(.2, .8, .2, 1) both;
}

.ms-message-reaction-picker {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid rgba(85, 129, 255, .24);
  border-radius: 18px;
  background: rgb(27 35 55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .32);
  scrollbar-width: none;
}

.ms-message-reaction-picker::-webkit-scrollbar {
  display: none;
}

.ms-message-reaction-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease;
}

.ms-message-reaction-choice:hover,
.ms-message-reaction-choice:focus-visible {
  background: rgba(35, 120, 220, .2);
  transform: scale(1.12);
}

.ms-message-reaction-choice.is-selected {
  background: rgba(35, 120, 220, .32);
}

.ms-message-menu {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  pointer-events: auto;
  width: 158px;
  max-height: var(--ms-message-menu-max-height, min(260px, 70vh));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(85, 129, 255, .24);
  border-radius: var(--br);
  background: rgb(27 35 55);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .34);
}

@keyframes ms-message-menu-reveal {
  from {
    opacity: 0;
    transform: translateY(6px) scaleX(.94) scaleY(.78);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ms-message-menu-item {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  border: 0;
  border-radius: calc(var(--br) - 2px);
  background: transparent;
  color: #f1f1f1;
  font-size: 12px;
  line-height: 16px;
  text-align: left;
  cursor: pointer;
}

.ms-message-menu-item:hover {
  background: rgb(30 42 63);
}

.ms-message-menu-item .ms-icon {
  width: 17px;
  height: 17px;
}

.ms-message-menu-item.is-danger {
  color: #ffb1a8;
}

.ms-message-reactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1px;
  width: max-content;
  max-width: 100%;
  min-height: 20px;
  margin: 0 auto 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(0 70 140);
  border-radius: 12px;
  background: rgba(9, 20, 31, .58);
}

.ms-message-reaction {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 20px;
  min-height: 20px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #c9d7e6;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}

.ms-message-reaction:hover,
.ms-message-reaction:focus-visible {
  border-color: rgba(35, 120, 220, .72);
  background: rgba(35, 120, 220, .2);
}

.ms-message-reaction.is-mine {
  background: rgba(35, 120, 220, .28);
}

.ms-message-reaction-emoji {
  font-size: 14px;
  line-height: 1;
}

.ms-message-reaction-count {
  font-size: 11px;
  line-height: 1;
}

.ms-reaction-users-loading,
.ms-reaction-users-empty {
  display: grid;
  min-height: 64px;
  place-items: center;
  color: #8fa4ba;
  font-size: 12px;
  text-align: center;
}

.ms-reaction-users-list {
  display: flex;
  flex-direction: column;
  max-height: min(52vh, 380px);
  margin-block: -12px;
  overflow-y: auto;
}

.ms-reaction-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.ms-reaction-user-row:last-child {
  border-bottom: 0;
}

.ms-reaction-user-avatar {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.ms-reaction-user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.ms-reaction-user-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.ms-reaction-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #e5edf6;
  font-size: 11px;
  font-weight: 400;
}

.ms-reaction-user-you {
  color: #53b4ff;
  font-size: 10px;
  font-weight: 500;
}

.ms-reaction-user-handle {
  margin-top: 0;
  overflow: hidden;
  color: #8197ad;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-reaction-user-emoji {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.ms-reaction-users-toggle {
  width: auto;
  min-width: 144px;
  min-height: 36px;
  margin-inline: auto;
  padding: 0 16px;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .ms-message-action-popover {
    animation: none;
  }
}

.ms-reply-card {
  width: auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  gap: 7px;
  margin: 0 0 8px;
  padding: 6px;
  border: 0;
  border-radius: var(--br);
  background: rgba(255, 255, 255, .055);
  color: inherit;
  text-align: left;
    transition: background .3s ease;
}

.ms-reply-card:hover {
  background: rgba(127, 215, 255, .1);
}

.ms-reply-card-bar {
  border-radius: 999px;
  background: #2378dc;
}

.ms-reply-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-reply-card-main.has-media {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.ms-reply-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-reply-media-thumb,
.ms-forward-media-thumb,
.ms-compose-context-media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 38px;
  height: 38px;
  border-radius: var(--br);
  background: rgb(5 14 24 / 70%);
}

.ms-reply-media-thumb img,
.ms-reply-media-thumb video,
.ms-forward-media-thumb img,
.ms-forward-media-thumb video,
.ms-compose-context-media img,
.ms-compose-context-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-reply-card-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7fd7ff;
  font-size: 12px;
  line-height: 15px;
}

.ms-reply-card-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #b8c1d0;
  font-size: 12px;
  line-height: 15px;
}

.ms-youtube-mini-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  max-width: 100%;
  color: inherit;
}

.ms-youtube-mini-media {
  display: block;
  width: 58px;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--br) - 2px);
  background: #111;
  overflow: hidden;
}

.ms-youtube-mini-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-youtube-mini-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-youtube-mini-label {
  color: #7fd7ff;
  font-size: 10px;
  line-height: 12px;
}

.ms-youtube-mini-title,
.ms-youtube-mini-desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.ms-youtube-mini-title {
  color: #e9edf5;
  font-size: 12px;
  line-height: 15px;
  -webkit-line-clamp: 2;
}

.ms-youtube-mini-desc {
  color: #b8c1d0;
  font-size: 11px;
  line-height: 14px;
  -webkit-line-clamp: 2;
}

.ms-youtube-mini-desc[hidden] {
  display: none;
}

.ms-youtube-mini-card--reply .ms-youtube-mini-label,
.ms-youtube-mini-card--compose-reply .ms-youtube-mini-label {
  display: none;
}

.ms-message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.25;
    letter-spacing: .03rem;
}

.ms-message-text.is-emoji-only {
    font-size: 34px;
    width: fit-content;
    letter-spacing: 0;
}

.ms-animated-emoji-run {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    vertical-align: middle;
}

.ms-animated-emoji {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
}

.ms-animated-emoji-img {
    display: block;
    width: 100%;
    height: 100%;
}

.ms-animated-emoji-img {
    object-fit: contain;
}

.ms-animated-emoji-native {
    display: none;
}

.ms-animated-emoji.is-fallback .ms-animated-emoji-img {
    display: none;
}

.ms-animated-emoji.is-fallback .ms-animated-emoji-native {
    display: inline;
}

.ms-animated-emoji--message {
    width: 60px;
    height: 60px;
}

.ms-message-deleted {
    color: #9da8bb;
    font-size: 12px;
    font-style: italic;
    padding: 8px 16px;
}

.ms-call-message {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.ms-call-message-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: rgba(35, 120, 220, .16);
    color: #2378dc;
}

button.ms-call-message-icon {
    padding: 0;
    border: 0;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}

button.ms-call-message-icon:hover {
    filter: brightness(1.24);
}

button.ms-call-message-icon:active {
    transform: scale(.92);
}

.ms-call-message.is-accepted .ms-call-message-icon {
    background: rgb(0 85 50);
    color: #35c56f;
}

.ms-call-message.is-failed .ms-call-message-icon,
.ms-call-message.is-missed .ms-call-message-icon,
.ms-call-message.is-declined .ms-call-message-icon,
.ms-call-message.is-canceled .ms-call-message-icon {
    background: rgb(120 75 75);
    color: tomato;
}

.ms-call-arrow {
    display: block;
    width: 18px;
    height: 18px;
}

.ms-call-message.is-accepted .ms-call-arrow {
    color: #35c56f;
}

.ms-call-message.is-failed .ms-call-arrow,
.ms-call-message.is-missed .ms-call-arrow,
.ms-call-message.is-declined .ms-call-arrow,
.ms-call-message.is-canceled .ms-call-arrow {
    color: tomato;
}

.ms-call-message-main {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
}

.ms-call-message-title {
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
}

.ms-call-message-sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #9da8bb;
    font-size: 12px;
    line-height: 1.2;
}

.ms-message-link {
    color: #7cc6ff;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .3s ease;
}

.ms-message-link:hover {
    color: #fff;
    text-decoration: underline;
}

.ms-message-link-card {
    width: min(360px, 62vw);
    max-width: 100%;
    margin: 8px 0 0;
    padding: 0;
    overflow: hidden;
    background: rgb(255 255 255 / 6%);
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: var(--br);
}

.ms-generic-link-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ms-generic-link-card[hidden],
.ms-link-card-media[hidden],
.ms-link-card-media img[hidden] {
    display: none;
}

.ms-link-card-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.ms-link-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-link-card-site {
    color: #7cc6ff;
    font-size: 11px;
    line-height: 14px;
}

.ms-message-link-card .ri-linkpreview__body.link-publish {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px;
    background: rgb(255 255 255 / 5%);
    border-radius: 0 0 var(--br) var(--br);
}

.ms-message-link-card .ri-linkpreview__title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.ms-message-link-card .ri-linkpreview__url {
    color: #9da8bb;
    font-size: 12px;
    text-decoration: none;
}

.ms-message-link-card .ms-youtube-card-desc,
.ms-message-link-card .ms-link-card-desc {
    display: -webkit-box;
    color: #b8c1d0;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ms-message-link-card .ms-youtube-card-desc[hidden],
.ms-message-link-card .ms-link-card-desc[hidden] {
    display: none;
}

.ms-youtube-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--br) var(--br) 0 0;
    overflow: hidden;
}

.ms-youtube-card-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.ms-message-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.ms-message-attachments + .ms-message-text {
  margin-top: 8px;
}

.ms-message-attachment--media {
  max-width: min(360px, 62vw);
  --maxMediaW: min(360px, 62vw);
}

.ms-message-attachment--media .ms-media-frame.ps-inline-animated[data-upload-kind="video"][data-media-kind="video"] {
  display: block;
  width: min(360px, 62vw);
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

.ms-message-attachment--media .ps-local-video {
  min-width: min(360px, 62vw);
}

.ms-message-attachment--media .ps-local-video__controls {
  box-sizing: border-box;
}

.ms-message-media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Match the media hit area to the frame, not the wider caption/bubble. */
.ms-messages .ms-message-attachment--media {
  width: fit-content;
  align-self: flex-start;
}

.ms-messages .ms-message-media-link {
  width: fit-content;
  max-width: 100%;
}

.ms-media-frame {
  position: relative;
  display: block;
  width: min(360px, 62vw);
  max-width: 100%;
  aspect-ratio: var(--ms-media-ratio, 16 / 10);
  border-radius: var(--br);
  background: #151515;
  overflow: hidden;
}

.ms-media-frame[data-ms-media-kind="image"][data-ms-ratio-known="1"]:not(.is-compact) {
  width: min(var(--ms-media-natural-width), min(360px, 62vw));
}

/* Bound chat photos in both axes, preserving their entire aspect ratio.
   Scope excludes the full-screen viewer, profile media grid and reply thumbs. */
.ms-messages .ms-media-frame[data-ms-media-kind="image"]:not(.is-compact) {
  --ms-chat-image-max-height: min(420px, 60vh);
  width: min(var(--ms-media-natural-width, 360px), 360px, 62vw, calc(var(--ms-chat-image-max-height) * var(--ms-media-ratio, 1.6)));
  max-height: var(--ms-chat-image-max-height);
}

@supports (height: 1dvh) {
  .ms-messages .ms-media-frame[data-ms-media-kind="image"]:not(.is-compact) {
    --ms-chat-image-max-height: min(420px, 60dvh);
  }
}

/* Uploaded chat videos use the same bounded, proportional footprint as photos. */
.ms-messages .ms-media-frame[data-ms-media-kind="video"]:not(.is-compact) {
  --ms-chat-video-max-height: min(420px, 60vh);
  width: min(var(--ms-media-natural-width, 360px), 360px, 62vw, calc(var(--ms-chat-video-max-height) * var(--ms-media-ratio, 1.6)));
  max-height: var(--ms-chat-video-max-height);
}

@supports (height: 1dvh) {
  .ms-messages .ms-media-frame[data-ms-media-kind="video"]:not(.is-compact) {
    --ms-chat-video-max-height: min(420px, 60dvh);
  }
}

.ms-media-frame.is-compact {
  width: 54px;
  height: 54px;
  aspect-ratio: auto;
}

.ms-media-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: #9da8bb;
  font-size: 12px;
  letter-spacing: 0;
  text-align: center;
  transition: opacity .18s ease;
}

.ms-media-frame.is-e2ee .ms-media-loading {
  flex-direction: column;
  gap: 8px;
}

.ms-media-frame.is-e2ee .ms-media-loading::before {
  content: '';
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 2px solid rgba(35, 120, 220, .25);
  border-top-color: #2378dc;
  border-radius: 50%;
  animation: ms-e2ee-media-spin .8s linear infinite;
}

.ms-media-frame.is-error .ms-media-loading::before {
  display: none;
}

@keyframes ms-e2ee-media-spin {
  to { transform: rotate(360deg); }
}

.ms-media-frame.is-loaded .ms-media-loading {
  opacity: 0;
  pointer-events: none;
}

.ms-media-frame.is-error .ms-media-loading {
  opacity: 1;
  color: #ff8a7a;
}

.ms-media-frame.is-error.is-offline .ms-media-loading {
  color: #9da8bb;
}

.ms-message-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .18s ease;
}

.ms-media-frame.is-loaded .ms-message-media {
  opacity: 1;
}

.ms-media-frame.is-compact .ms-message-media {
  object-fit: cover;
}

.ms-message-file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: min(360px, 62vw);
  padding: 8px;
  border: 1px solid rgba(85, 129, 255, .22);
  border-radius: var(--br);
  background: rgba(255, 255, 255, .04);
  color: inherit;
  text-decoration: none;
}

.ms-message-file.is-loading {
  pointer-events: none;
}

.ms-file-download-icon {
  position: relative;
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.ms-file-download-icon::before,
.ms-voice-play::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(#35d07f calc(var(--ms-load-progress, 0) * 1%), #68737f 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  transition: opacity .18s ease;
}

.ms-message-file.is-loading .ms-file-download-icon::before,
.ms-voice-player.is-loading .ms-voice-play::before {
  opacity: 1;
}

.ms-file-download-icon .ms-icon,
.ms-voice-play .ms-icon {
  position: relative;
  z-index: 1;
}

.ms-message-file-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-message-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 400;
}

.ms-message-file-size,
.ms-compose-attachment-size {
  color: #9da8bb;
  font-size: 12px;
  letter-spacing: 0;
}

.ms-message-attachment--voice,
.ms-message-attachment--audio {
  min-width: min(320px, 64vw);
  max-width: min(360px, 72vw);
}

.ms-voice-player {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--br);
  background: rgb(10 45 80);
  box-shadow: inset 0 0 0 1px rgba(85, 129, 255, .3);
}

.ms-audio-player {
  grid-template-columns: 34px minmax(0, 1fr) 30px;
}

.ms-audio-download {
  width: 30px;
  height: 30px;
  min-width: 30px;
  max-width: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.ms-audio-player .ms-voice-label {
  color: #c7d1df;
}

.ms-sticky-audio {
  position: absolute;
  top: 6px;
  right: 10px;
  left: 10px;
  z-index: 12;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto minmax(84px, 110px) 28px 28px;
  grid-template-rows: 18px 12px;
  grid-template-areas:
    "play name time volume download close"
    "play progress progress volume download close";
  align-items: center;
  column-gap: 7px;
  row-gap: 3px;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid rgb(35 120 220 / 32%);
  border-radius: var(--br);
  background: linear-gradient(100deg, rgb(10 38 66 / 96%), rgb(14 31 51 / 96%));
  box-shadow: 0 4px 14px rgb(0 0 0 / 22%), inset 0 0 18px rgb(35 120 220 / 7%);
  color: #c7d1df;
  cursor: pointer;
}

.ms-sticky-audio.is-list-host {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: 12;
  flex: 0 0 auto;
  width: auto;
  margin: 4px 10px 2px;
}

.ms-audio-session-host {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ms-sticky-audio__action[hidden] {
  display: none;
}

.ms-sticky-audio[hidden] {
  display: none;
}

.ms-sticky-audio.is-revealing {
  animation: ms-sticky-audio-reveal 260ms cubic-bezier(.22, 1, .36, 1) both;
}

.ms-sticky-audio.is-hiding {
  pointer-events: none;
  animation: ms-sticky-audio-hide 220ms cubic-bezier(.4, 0, 1, 1) both;
}

@keyframes ms-sticky-audio-reveal {
  from {
    opacity: 0;
    transform: translate3d(0, calc(-100% - 12px), 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ms-sticky-audio-hide {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, calc(-100% - 12px), 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-sticky-audio.is-revealing,
  .ms-sticky-audio.is-hiding {
    animation: none;
  }
}

.ms-sticky-audio__action {
  appearance: none;
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8da2ba;
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.ms-sticky-audio__action:hover {
  color: #6eb0ff;
  background: rgb(35 120 220 / 18%);
}

.ms-sticky-audio__action:active {
  transform: scale(.94);
}

.ms-sticky-audio__action .ms-icon {
  width: 17px;
  height: 17px;
}

.ms-sticky-audio__play {
  grid-area: play;
  width: 30px;
  height: 30px;
  color: #7db7fa;
  background: rgb(35 120 220 / 24%);
}

.ms-sticky-audio.is-playing .ms-sticky-audio__play {
  color: #b9dcff;
  background: rgb(35 120 220 / 42%);
}

.ms-sticky-audio__name {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dce7f4;
  font-size: 12px;
  line-height: 18px;
}

.ms-sticky-audio__time {
  grid-area: time;
  white-space: nowrap;
  color: #8ea0b5;
  font-size: 10px;
  line-height: 18px;
}

.ms-sticky-audio__progress {
  grid-area: progress;
  appearance: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  outline: 0;
  box-shadow: none;
  background: linear-gradient(to right, #2378dc 0 var(--ms-audio-progress, 0%), rgb(125 159 195 / 20%) var(--ms-audio-progress, 0%) 100%) center / 100% 3px no-repeat;
  cursor: pointer;
}

.ms-sticky-audio__progress::-webkit-slider-runnable-track,
.ms-sticky-audio__volume input::-webkit-slider-runnable-track {
  height: 3px;
  border: 0;
  background: transparent;
}

.ms-sticky-audio__progress::-webkit-slider-thumb,
.ms-sticky-audio__volume input::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  margin-top: -3px;
  border: 0;
  border-radius: 50%;
  background: #79b6ff;
  box-shadow: 0 0 0 2px rgb(4 19 34 / 72%);
}

.ms-sticky-audio__progress::-moz-range-track,
.ms-sticky-audio__volume input::-moz-range-track {
  height: 3px;
  border: 0;
  background: transparent;
}

.ms-sticky-audio__progress::-moz-range-thumb,
.ms-sticky-audio__volume input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #79b6ff;
  box-shadow: 0 0 0 2px rgb(4 19 34 / 72%);
}

.ms-sticky-audio__volume {
  grid-area: volume;
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.ms-sticky-audio__volume-toggle {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  min-width: 24px;
}

.ms-sticky-audio__volume.is-open .ms-sticky-audio__volume-toggle {
  color: #6eb0ff;
  background: rgb(35 120 220 / 18%);
}

.ms-sticky-audio__volume input {
  appearance: none;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background-color: transparent;
  background: linear-gradient(to right, #5a9eed 0 var(--ms-audio-volume, 100%), rgb(125 159 195 / 20%) var(--ms-audio-volume, 100%) 100%) center / 100% 3px no-repeat;
  cursor: pointer;
}

.ms-sticky-audio.is-compact-volume {
  grid-template-columns: 30px minmax(0, 1fr) auto 28px 28px 28px;
}

.ms-sticky-audio.is-compact-volume .ms-sticky-audio__volume {
  width: 28px;
}

.ms-sticky-audio.is-compact-volume .ms-sticky-audio__volume-toggle {
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex-basis: 28px;
}

.ms-sticky-audio.is-compact-volume .ms-sticky-audio__volume input {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 3;
  width: 30px;
  height: 96px;
  padding: 8px 0;
  border: 1px solid rgb(35 120 220 / 36%);
  border-radius: 15px;
  background: linear-gradient(to top, #5a9eed 0 var(--ms-audio-volume, 100%), rgb(125 159 195 / 26%) var(--ms-audio-volume, 100%) 100%) center / 3px calc(100% - 16px) no-repeat, rgb(8 27 47 / 98%);
  box-shadow: 0 6px 18px rgb(0 0 0 / 32%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity .16s ease, transform .16s ease;
  writing-mode: vertical-lr;
  direction: rtl;
}

.ms-sticky-audio.is-volume-layout-switching .ms-sticky-audio__volume input {
  transition: none !important;
}

.ms-sticky-audio__progress:focus-visible,
.ms-sticky-audio__volume:not(.is-open) input:focus-visible {
  box-shadow: none;
}

.ms-sticky-audio.is-compact-volume .ms-sticky-audio__volume.is-open input {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.ms-sticky-audio__download {
  grid-area: download;
  color: #4b9cff;
}

.ms-sticky-audio__close {
  grid-area: close;
}

.ms-voice-play {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgb(35 120 220 / 30%);
  color: rgb(135 135 135);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.ms-voice-play:hover,
.ms-voice-player.is-playing .ms-voice-play {
  background: rgb(35 120 220 / 50%);
  color: #6eb0ff;
}

.ms-voice-player.is-loading .ms-voice-play {
  pointer-events: none;
  opacity: 1;
}

.ms-voice-play .ms-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.ms-voice-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ms-voice-wave,
.ms-voice-record-wave {
  height: 28px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ms-voice-wave {
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.ms-voice-wave-bar {
  width: 3px;
  height: max(4px, var(--ms-voice-bar, 18%));
  border-radius: 999px;
  background: rgb(135 135 135);
  transition: background .16s ease, height .16s ease;
}

.ms-voice-wave-bar.is-active,
.ms-voice-player.is-playing .ms-voice-wave-bar.is-active {
  background: #2378dc;
}

.ms-voice-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9da8bb;
  font-size: 11px;
  line-height: 1;
}

.ms-voice-label,
.ms-voice-time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-message-time {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 6px;
    color: #9da8bb;
    font-size: 11px;
    line-height: 14px;
    text-align: right;
    padding-top: 6px;
    margin: 0 0 -6px;
}

.ms-conversation-list .ms-message-time {
    margin: 0;
}

.ms-message-edited {
  color: #8e9aab;
}

.ms-message-status {
  display: inline-flex;
  align-items: center;
  width: 10px;
  height: 12px;
  color: #2378dc;
}

.ms-message-status.is-read {
  width: 14px;
}

.ms-message-status.is-pending {
  width: 14px;
  min-width: 14px;
  height: 14px;
  color: #8fa3c0;
}

.ms-message-pending-spinner {
  width: 12px;
  height: 12px;
  min-width: 12px;
  box-sizing: border-box;
  flex: 0 0 auto;
  border: 2px solid rgba(143, 163, 192, .32);
  border-top-color: #2378dc;
  border-radius: 50%;
  animation: ms-message-pending-spin .75s linear infinite;
}

.ms-check {
  position: relative;
  display: inline-flex;
  width: 13px;
  height: 13px;
  color: #2378dc;
  transition: color .16s ease;
}

/*.ms-check--sent {
  z-index: 1;
}*/

.ms-check--read {
  z-index: 0;
  margin-left: -7px;
}

.ms-check-icon {
  width: 13px;
  height: 13px;
}

@keyframes ms-message-pending-spin {
  to {
    transform: rotate(360deg);
  }
}

.ms-message.is-highlighted::after,
.ms-system-message.is-highlighted::after {
  content: "";
  position: absolute;
  inset: -4px var(--ms-message-highlight-right, 0px) -4px var(--ms-message-highlight-left, 0px);
  z-index: -1;
  pointer-events: none;
  background: rgba(35, 120, 220, .24);
  opacity: 0;
  will-change: opacity;
  animation: ms-message-highlight 3s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes ms-message-highlight {
  0% { opacity: 0; }
  14% { opacity: 1; }
  62% { opacity: .58; }
  100% { opacity: 0; }
}

.ms-composer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  padding: 5px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ms-composer.is-disabled {
  opacity: .7;
}

.ms-composer.is-locked {
  opacity: 1;
}

.ms-composer.is-locked .ms-compose-main,
.ms-composer.is-locked .ms-send-btn {
  display: none;
}

.ms-composer-blocked {
    grid-column: 1 / -1;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(85, 129, 255, 0.18);
    border-radius: var(--br);
    background: #242424;
    color: #aeb6c8;
    font-size: 12px;
    line-height: 1;
}

.ms-composer-blocked[hidden] {
  display: none;
}

.ms-compose-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ms-compose-line {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.ms-compose-tools {
  display: flex;
  align-items: center;
  gap: 4px;
    padding: 1px;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.ms-compose-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
    border: none;
    box-shadow: 0 0 0 1px rgb(35 120 220 / 20%);
  border-radius: var(--br);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}

.ms-compose-tool:hover {
  background: rgb(35 120 220 / 20%);
}

/*.ms-compose-tool:disabled,
.ms-send-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.ms-compose-tool .ms-icon {
    width: 18px;
    height: 18px;
}
button.ms-send-btn:disabled {
    background: transparent;
    border: none;
}*/
button.ms-send-btn:disabled svg {
    color: gray;
    stroke: currentColor;
}

.ms-compose-input {
  width: 100%;
  max-width: none;
  min-height: 32px;
  max-height: 130px;
  overflow-y: auto;
  box-sizing: border-box;
}

.ms-compose-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(85, 129, 255, 0.2);
  border-radius: var(--br);
  transition: border-color .18s ease;
}

.ms-compose-field:focus-within {
  box-shadow: 0 0 0 1px rgba(35, 120, 220, 0.40);
}

.ms-voice-record-panel {
  position: relative;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0;
}

.ms-voice-record-panel[hidden] {
  display: none;
}

.ms-voice-record-hint {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  animation: msVoiceRecordHintGlow 1.05s ease-in-out infinite;
}

.ms-voice-record-hint--cancel {
  right: 12px;
  bottom: 4px;
  color: #ff8a7a;
  background: rgba(80, 28, 24, .96);
  transform: translateX(calc(var(--ms-voice-cancel-progress, 0) * -18px));
}

.ms-voice-record-hint--lock {
  right: -46px;
  bottom: 36px;
  flex-direction: column;
  gap: 5px;
  text-align: center;
  color: #65d39b;
  background: rgba(18, 62, 42, .96);
  transform: translateY(calc(var(--ms-voice-lock-progress, 0) * -10px));
}

.ms-voice-record-hint-arrows {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.ms-voice-record-hint-arrows span {
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.ms-voice-record-hint--cancel .ms-voice-record-hint-arrows span {
  transform: rotate(45deg);
  margin-right: -1px;
}

.ms-voice-record-hint--lock .ms-voice-record-hint-arrows {
  flex-direction: column;
  gap: 0;
}

.ms-voice-record-hint--lock .ms-voice-record-hint-arrows span {
  transform: rotate(135deg);
  margin-bottom: -1px;
}

.ms-composer.is-voice-locked .ms-voice-record-hint,
.ms-composer.is-voice-sending .ms-voice-record-hint {
  display: none;
}

.ms-voice-record-main {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(96px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  background: transparent;
  box-shadow: none;
}

.ms-voice-record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: tomato;
  box-shadow: 0 0 0 0 rgba(255, 99, 71, .42);
  animation: msVoicePulse 1.1s ease-in-out infinite;
}

.ms-voice-record-time {
  color: #dce9ff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.ms-voice-record-wave {
  overflow: hidden;
  transform: translateX(calc(var(--ms-voice-cancel-progress, 0) * -18px));
  opacity: calc(1 - (var(--ms-voice-cancel-progress, 0) * .34));
  transition: transform .06s linear, opacity .06s linear;
}

.ms-voice-record-wave .ms-voice-wave-bar {
  background: rgba(127, 215, 255, .35);
}

.ms-voice-record-cancel {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: var(--br);
  background: rgba(255, 99, 71, .12);
  color: #ff9c91;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.ms-voice-record-cancel:hover {
  background: rgba(255, 99, 71, .22);
  color: #ffc1bb;
}

.ms-voice-record-cancel .ms-icon {
  width: 15px;
  height: 15px;
  color: currentColor;
}

.ms-voice-record-lock {
  position: absolute;
  right: -46px;
  bottom: 40px;
  width: 44px;
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 9px 4px 8px;
  border-radius: 999px;
  background: rgba(20, 28, 42, .96);
  box-shadow: inset 0 0 0 1px rgba(85, 129, 255, .22), 0 10px 24px rgba(0, 0, 0, .25);
  color: #aeb6c8;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(.96);
  transition: opacity .14s ease, visibility .14s ease, color .18s ease, background .18s ease, transform .18s ease;
}

.ms-voice-record-lock.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ms-voice-record-lock.is-locked {
  color: #65d39b;
  background: rgba(28, 168, 104, .18);
  transform: translateY(-4px) scale(1);
}

.ms-voice-record-rail {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 4px;
  height: 70px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}

.ms-voice-record-rail-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--ms-voice-lock-progress, 0) * 100%);
  border-radius: inherit;
  background: linear-gradient(180deg, #8ff0b8, #2fc67b);
  box-shadow: 0 0 10px rgba(80, 220, 145, .45);
  transition: height .06s linear;
}

.ms-voice-record-lock-icon .ms-icon {
  width: 18px;
  height: 18px;
  color: currentColor;
}

.ms-voice-record-lock-icon {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: #aeb6c8;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.ms-voice-record-lock-open,
.ms-voice-record-lock-closed {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .16s ease, transform .16s ease;
}

.ms-voice-record-lock-open {
  opacity: calc(1 - var(--ms-voice-lock-progress, 0));
  transform: translateY(calc(var(--ms-voice-lock-progress, 0) * -5px));
}

.ms-voice-record-lock-closed {
  opacity: var(--ms-voice-lock-progress, 0);
  transform: translateY(calc((1 - var(--ms-voice-lock-progress, 0)) * 5px));
}

.ms-voice-record-lock.is-ready .ms-voice-record-lock-icon,
.ms-voice-record-lock.is-locked .ms-voice-record-lock-icon {
  color: #65d39b;
  background: rgba(56, 214, 135, .16);
  transform: scale(1.05);
}

.ms-voice-record-lock-text {
  position: relative;
  z-index: 1;
  margin-top: 73px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
}

.ms-composer.is-voice-recording .ms-compose-editor,
.ms-composer.is-voice-sending .ms-compose-editor,
.ms-composer.is-voice-recording .ms-attachment-tray,
.ms-composer.is-voice-sending .ms-attachment-tray {
  display: none;
}

.ms-composer.is-voice-recording .ms-compose-field,
.ms-composer.is-voice-sending .ms-compose-field {
  overflow: visible;
}

.ms-composer.is-voice-recording,
.ms-composer.is-voice-recording * {
  touch-action: none;
  overscroll-behavior: contain;
  overflow-anchor: none;
  user-select: none;
}

.ms-send-btn.is-voice-mode .ms-icon,
.ms-send-btn.is-recording .ms-icon {
  width: 22px;
  height: 22px;
}

.ms-send-btn.is-voice-mode,
.ms-send-btn.is-recording {
  touch-action: none;
  user-select: none;
}

.ms-send-btn.is-recording {
  position: relative;
  overflow: visible;
  transform: translateY(var(--ms-voice-drag-y, 0));
  transition: transform .06s linear, color .2s ease, background .2s ease, box-shadow .2s ease;
}

/*.ms-send-btn.is-recording:disabled {
  opacity: 1;
  cursor: pointer;
}*/

.ms-send-btn.is-recording::before,
.ms-send-btn.is-recording::after {
  content: none;
}

.ms-send-btn.is-recording {
  color: #65d39b;
  background: rgba(38, 179, 109, .15);
  box-shadow: 0 0 0 1px rgba(75, 232, 148, .28), 0 0 0 0 rgba(75, 232, 148, .28), 0 0 16px rgba(75, 232, 148, .22);
  animation: msVoiceRecordButtonPulse 1.25s ease-in-out infinite;
}

.ms-send-btn.is-recording .ms-icon {
  position: relative;
  z-index: 1;
  color: currentColor;
}

.ms-send-btn.is-locked-recording {
  color: #2378dc;
  transform: translateY(0);
  animation: none;
  box-shadow: 0 0 0 1px rgba(35, 120, 220, .24);
}

@keyframes msVoicePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 99, 71, .42); }
  70% { box-shadow: 0 0 0 8px rgba(255, 99, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 99, 71, 0); }
}

@keyframes msVoiceRecordHintGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 10px currentColor; }
}

@keyframes msVoiceRecordRingSpin {
  to { transform: rotate(360deg); }
}

@keyframes msVoiceRecordRingPulse {
  0%, 100% { transform: scale(.92); opacity: .35; }
  50% { transform: scale(1.08); opacity: .95; }
}

@keyframes msVoiceRecordButtonPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(75, 232, 148, .28), 0 0 0 0 rgba(75, 232, 148, .28), 0 0 12px rgba(75, 232, 148, .18);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(75, 232, 148, .42), 0 0 0 8px rgba(75, 232, 148, 0), 0 0 20px rgba(75, 232, 148, .32);
  }
}

.ms-compose-context {
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 7px 7px 0;
  padding: 7px;
  border-radius: var(--br);
  background: rgba(255, 255, 255, .055);
}

.ms-compose-context[hidden] {
  display: none;
}

.ms-compose-context-bar {
  align-self: stretch;
  border-radius: 999px;
  background: #2378dc;
}

.ms-compose-context-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-compose-context-main.has-media {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.ms-compose-context-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-compose-context-label {
  color: #9da8bb;
  font-size: 11px;
  line-height: 13px;
}

.ms-compose-context-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7fd7ff;
  font-size: 12px;
  line-height: 15px;
}

.ms-compose-context-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #d3d9e4;
  font-size: 12px;
  line-height: 15px;
}

.ms-compose-context-close {
  width: 26px;
  height: 26px;
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--br);
  background: rgba(0, 0, 0, .18);
  color: #fff;
  cursor: pointer;
}

.ms-compose-context-close:hover {
  background: #343a46;
  border-color: rgba(85, 129, 255, .26);
}

.ms-compose-link-preview {
  padding: 7px 7px 0;
}

.ms-compose-link-preview[hidden] {
  display: none;
}

.ms-compose-link-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  min-height: 72px;
  padding: 6px 34px 6px 6px;
  border-radius: var(--br);
  border: 1px solid rgb(255 255 255 / 8%);
  background: rgb(255 255 255 / 5%);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.ms-compose-link-card-media {
  display: block;
  width: 96px;
  aspect-ratio: 16 / 9;
  align-self: center;
  border-radius: var(--br);
  background: #111;
  overflow: hidden;
}

.ms-compose-link-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-compose-link-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.ms-compose-link-card-label {
  color: #7cc6ff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.ms-compose-link-card-title {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-compose-link-card-desc {
  color: #b8c1d0;
  font-size: 12px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-compose-link-card-url {
  color: #9da8bb;
  font-size: 11px;
  line-height: 1;
}

.ms-compose-link-card-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--br);
  color: #b8c1d0;
  transition: background .3s ease, color .3s ease;
}

.ms-compose-link-card-close:hover {
  background: rgb(255 255 255 / 12%);
  color: #fff;
}

.ms-compose-editor {
  position: relative;
  padding: 6px 10px;
  border: 0;
  background: var(--bg-box);
  color: #fff;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  outline: none;
}

.ms-compose-editor:empty::before,
.ms-compose-editor.is-empty::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  color: #8c96a8;
  pointer-events: none;
}

.ms-attachment-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 8px 0;
}

.ms-attachment-tray[hidden],
.ms-compose-picker[hidden] {
  display: none;
}

.ms-compose-attachment {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  width: min(320px, 100%);
  padding: 5px;
  border: 1px solid rgba(85, 129, 255, .2);
  border-radius: var(--br);
  background: rgba(255, 255, 255, .04);
}

.ms-compose-attachment.is-uploading {
  grid-template-columns: 54px minmax(0, 1fr);
  width: min(320px, 100%);
  color: #b9c7dc;
}

.ms-compose-attachment-preview {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--br);
  background: #181818;
}

.ms-compose-file-icon {
  display: inline-flex;
  color: #9fb7ff;
}

.ms-compose-attachment-main {
  min-width: 0;
}

.ms-compose-attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-compose-attachment-remove {
  width: 26px;
  height: 26px;
  min-width: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 99, 71, .3);
  border-radius: var(--br);
  background: #3a2523;
  color: #fff;
  cursor: pointer;
}

.ms-compose-upload-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fd7ff;
  box-shadow: 0 0 0 0 rgba(127, 215, 255, .55);
  animation: ms-upload-pulse 1s ease-in-out infinite;
}

.ms-compose-upload-progress {
  width: 100%;
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.ms-compose-upload-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #7fd7ff;
  transition: width .16s ease;
}

@keyframes ms-upload-pulse {
  0%, 100% { transform: scale(.86); opacity: .65; }
  50% { transform: scale(1.15); opacity: 1; }
}

.ms-compose-picker {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 0px);
  z-index: 30;
  max-height: min(360px, 48dvh);
  display: flex;
  flex-direction: column;
  min-width: 0;
    max-width: 380px;
  overflow: hidden;
  border: rgb(35 120 220 / 20%) solid 1px;
  border-radius: var(--br);
    background: rgb(27 35 55);
    box-shadow: 0 0 20px rgb(0 0 0 / 20%);
}

.ms-compose-picker.is-upload-menu {
  left: 10px;
  right: auto;
  width: 160px;
  max-height: none;
}

.ms-compose-picker-head {
  flex: 0 0 auto;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 14px;
    text-align: center;
  color: #dce8ff;
}

.ms-compose-picker-title-main {
  margin-bottom: 8px;
}

.ms-compose-picker-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
  padding: 2px;
  border-radius: var(--br);
  background: rgba(255, 255, 255, .05);
}

.ms-compose-picker-tab {
  min-width: 0;
  height: 24px;
  border: 0;
  border-radius: calc(var(--br) - 2px);
  background: transparent;
  color: #aeb9cc;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.ms-compose-picker-tab:hover,
.ms-compose-picker-tab.is-active {
  background: rgb(35 120 220 / 24%);
  color: #fff;
}

.ms-emoji-cats {
  display: flex;
  align-items: center;
    justify-content: center;
  gap: 3px;
  overflow-x: auto;
}

.ms-emoji-cat {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--br);
  background: transparent;
  color: #dce8ff;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.ms-emoji-cat:hover,
.ms-emoji-cat.is-active {
  background: rgba(127, 215, 255, .12);
}

.ms-compose-picker-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.ms-compose-picker-loading {
  padding: 18px 12px;
  color: #9da8bb;
  font-size: 12px;
  text-align: center;
}

.ms-compose-picker-section + .ms-compose-picker-section {
  margin-top: 10px;
}

.ms-compose-picker-title {
  margin-bottom: 6px;
  color: #9da8bb;
  font-size: 12px;
  letter-spacing: 0;
}

.ms-compose-picker-grid {
  display: grid;
  gap: 5px;
}

.ms-compose-picker-grid--emoji {
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
  gap: 0px;
}

.ms-compose-picker.is-animated-emoji-mode .ms-compose-picker-grid--emoji {
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 4px;
}

.ms-compose-picker-grid--gif {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.ms-gif-btn {
  border: 1px solid rgb(35 120 220 / 20%);
  border-radius: var(--br);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ms-emoji-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border: 0;
  border-radius: var(--br);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background .15s ease, transform .15s ease;
}

.ms-compose-picker.is-animated-emoji-mode .ms-emoji-btn {
  width: 60px;
  height: 60px;
}

.ms-animated-emoji--picker {
  width: 50px;
  height: 50px;
}

.ms-emoji-btn .ms-animated-emoji-native {
  font-size: 17px;
}

.ms-gif-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  text-align: left;
}

.ms-gif-btn img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  border-radius: calc(var(--br) - 2px);
  background: #151515;
}

.ms-gif-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.ms-emoji-btn:hover {
  background: rgba(127, 215, 255, .12);
  transform: translateY(-1px);
}

.ms-gif-btn:hover {
  background: #344054;
  border-color: rgba(0, 220, 255, .3);
  transform: translateY(-1px);
}

.ms-upload-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
}

.ms-upload-menu-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--br);
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease;
}

.ms-upload-menu-item:hover {
  background: rgba(127, 215, 255, .12);
}

.ms-send-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
    border: none;
    background: transparent;
}

.ms-modal-layer {
    position: absolute;
    top: var(--ms-modal-viewport-top, 0px);
    left: var(--ms-modal-viewport-left, 0px);
    width: var(--ms-modal-viewport-width, 100%);
    height: var(--ms-modal-viewport-height, 100%);
    box-sizing: border-box;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    padding: calc(8px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
    overflow: hidden;
}

.ms-compose-link-card-media[hidden] {
  display: none;
}

.ms-compose-link-card.is-text-only {
  grid-template-columns: minmax(0, 1fr);
}

.ms-modal {
  width: min(560px, 100%);
  max-height: min(760px, 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgb(10 25 40);
  border: 1px solid rgb(35 120 220 / 20%);
  border-radius: var(--br);
  box-shadow: 0 0 30px rgba(0, 0, 0, .3);
}

.ms-modal-head {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.ms-modal-title {
  margin: 0;
  font-size: 14px;
}

.ms-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-modal-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.ms-modal-action-left {
  margin-right: auto;
}

.ms-create-group-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 8px;
  border-radius: var(--br);
  background: rgb(25 40 60);
  border: 1px solid rgba(35, 120, 220, .18);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.ms-create-group-entry:hover,
.ms-create-group-entry:focus-visible {
  background: rgb(30 45 70);
  border-color: rgba(35, 120, 220, .32);
  outline: none;
}

.ms-create-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--br);
  color: #2378dc;
  background: rgb(35 120 220 / 14%);
}

.ms-create-group-icon .ms-icon {
  color: currentColor;
}

.ms-create-group-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.ms-settings-section-title {
  width: 100%;
  margin-top: 8px;
  text-align: left;
}

.ms-settings-link {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 0;
  border-radius: var(--br);
  background: rgb(25 40 60);
  color: #f2f5fb;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease;
}

.ms-settings-link:hover,
.ms-settings-link:focus-visible {
  background: rgb(30 45 70);
  outline: none;
}

.ms-settings-link-icon,
.ms-encrypted-device-icon,
.ms-encrypted-device-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2378dc;
}

.ms-settings-link-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--br);
  background: rgba(35, 120, 220, .12);
}

.ms-settings-link-icon .ms-icon,
.ms-encrypted-device-icon .ms-icon {
  width: 22px;
  height: 22px;
}

.ms-settings-link-chevron {
  display: inline-flex;
  color: #7f8da0;
}

.ms-settings-link-chevron .ms-icon {
  width: 18px;
  height: 18px;
}

.ms-encrypted-devices-loading {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #aeb8c6;
}

.ms-encrypted-devices-note {
  padding: 8px 10px;
  border-left: 2px solid rgba(71, 199, 125, .72);
  background: rgba(71, 199, 125, .07);
  color: #b3bdca;
  font-size: 12px;
  line-height: 17px;
}

.ms-encrypted-devices-heading {
  margin: 8px 2px 0;
  color: #8da3bf;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.ms-encrypted-devices-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ms-encrypted-device {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(35, 120, 220, .16);
  border-radius: var(--br);
  background: rgb(25 40 60);
}

.ms-encrypted-device.is-current,
.ms-encrypted-device.is-trusted {
  border-color: rgba(71, 199, 125, .28);
}

.ms-encrypted-device.is-revoked {
  opacity: .62;
}

.ms-encrypted-device-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(35, 120, 220, .12);
}

.ms-encrypted-device-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ms-encrypted-device-name {
  overflow: hidden;
  color: #f3f6fa;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-encrypted-device-meta,
.ms-encrypted-device-fingerprint,
.ms-encrypted-device-status {
  overflow: hidden;
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-encrypted-device-meta {
  color: #8f9caf;
}

.ms-encrypted-device-fingerprint {
  color: #8da3bf;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ms-encrypted-device-status,
.ms-encrypted-device-current {
  color: #58c987;
}

.ms-encrypted-device:not(.is-trusted) .ms-encrypted-device-status {
  color: #e1a548;
}

.ms-encrypted-device.is-revoked .ms-encrypted-device-status {
  color: tomato;
}

.ms-encrypted-device-current {
  font-size: 11px;
  white-space: nowrap;
}

.ms-encrypted-device-action {
  min-width: 76px;
}

.ms-encrypted-device-action.is-approve,
.ms-encrypted-device-approve {
  border-color: rgba(71, 199, 125, .45);
  background: rgba(71, 199, 125, .12);
  color: #72d99d;
}

.ms-encrypted-device-action.is-approve:hover,
.ms-encrypted-device-approve:hover {
  background: rgba(71, 199, 125, .2);
}

.ms-encrypted-device-confirm {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  color: #e9edf5;
}

.ms-encrypted-device-confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(35, 120, 220, .12);
}

.ms-encrypted-device-confirm-icon .ms-icon {
  width: 23px;
  height: 23px;
}

.ms-encrypted-device-confirm-main {
  min-width: 0;
}

.ms-encrypted-device-confirm p {
  margin: 5px 0 9px;
  color: #9da8b8;
  font-size: 12px;
  line-height: 17px;
}

.ms-encrypted-device-full-fingerprint {
  display: block;
  padding: 8px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(35, 120, 220, .2);
  border-radius: var(--br);
  background: rgb(15 30 48);
  color: #b9cae0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 17px;
}

@media (max-width: 440px) {
  .ms-encrypted-device {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .ms-encrypted-device-icon {
    width: 38px;
    height: 38px;
  }

  .ms-encrypted-device-action {
    min-width: 66px;
    padding-inline: 8px;
  }
}

.ms-delete-message-copy {
  color: #e9edf5;
  line-height: 1.4;
}

.ms-delete-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #d3d9e4;
  cursor: pointer;
}

.ms-contact-list,
.ms-block-list,
.ms-member-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ms-contact,
.ms-member-row,
.ms-setting-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: var(--br);
  background: rgb(25 40 60);
    transition: background .2s ease;
}

.ms-contact {
  cursor: pointer;
}

.ms-contact:hover {
  background: rgb(30 45 70);
}

.ms-contact.is-disabled {
  cursor: default;
  opacity: .68;
}

.ms-contact.is-disabled:hover {
  background: rgb(24 24 24);
}

.ms-contact.is-pending {
  opacity: .78;
}

.ms-invite-cancel-btn {
  min-width: 68px;
}

.ms-invite-cancel-btn .ms-invite-cancel-text {
  display: none;
}

.ms-invite-cancel-btn:not([data-ms-invite-cancel-lock="1"]):hover {
  box-shadow: 0 0 0 1px rgba(255, 99, 71, .35);
  background: rgb(80 45 45);
}

.ms-invite-cancel-btn:not([data-ms-invite-cancel-lock="1"]):hover .ms-invite-sent-text {
  display: none;
}

.ms-invite-cancel-btn:not([data-ms-invite-cancel-lock="1"]):hover .ms-invite-cancel-text {
  display: inline;
}

.ms-contact.is-selected {
  background: rgb(35 120 220 / 20%);
}

.ms-forward-modal {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
}

.ms-forward-preview {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(85, 129, 255, .16);
  border-radius: var(--br);
  background: #0b1a2a;
}

.ms-forward-preview-label {
  color: #8ebcf4;
  font-size: 11px;
  line-height: 14px;
}

.ms-forward-preview-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e9edf5;
  font-size: 13px;
  line-height: 17px;
}

.ms-forward-preview .ms-youtube-mini-card {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}

.ms-forward-preview .ms-youtube-mini-media {
  width: 96px;
}

.ms-forward-preview .ms-youtube-mini-title {
  font-size: 13px;
  line-height: 16px;
}

.ms-forward-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.ms-forward-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(85, 129, 255, .16);
  border-radius: var(--br);
  background: #19283c;
  color: #cfd6e2;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.ms-forward-tab:hover,
.ms-forward-tab.is-active {
  background: rgb(0 100 255 / 15%);
  border-color: rgba(0, 220, 255, .28);
  color: #fff;
}

.ms-forward-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 16px;
  height: 16px;
  padding: 1px 4px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.ms-forward-preview-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ms-forward-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ms-forward-panels {
  min-height: 0;
}

.ms-forward-panel {
  display: none;
  min-height: 0;
}

.ms-forward-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ms-forward-panel-title {
  color: #9ea8b7;
  font-size: 12px;
  line-height: 16px;
}

.ms-forward-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ms-forward-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .04);
  border-radius: var(--br);
  background: rgb(25 40 60);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.ms-forward-target:hover,
.ms-forward-target.is-selected {
  background: rgb(30 45 70);
}

.ms-forward-target.is-selected {
  border-color: rgba(90, 179, 255, .38);
}

.ms-forward-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
}

.ms-forward-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.ms-forward-target-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-forward-target-title,
.ms-forward-target-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-forward-target-title {
  color: #f1f4fa;
  font-size: 13px;
  line-height: 17px;
}

.ms-forward-target-sub {
  color: #9da8b8;
  font-size: 12px;
  line-height: 15px;
}

.ms-forward-target-check {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(85, 129, 255, .2);
  border-radius: 50%;
  color: transparent;
}

.ms-forward-target.is-selected .ms-forward-target-check {
  background: #2378dc;
  border-color: #2378dc;
  color: #fff;
}

.ms-forward-target-check .ms-check-icon {
  width: 13px;
  height: 13px;
}

.ms-setting-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ms-setting-row--sound {
  align-items: flex-start;
}

.ms-setting-row--select {
  align-items: center;
}

.ms-switch-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 68px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.ms-switch-input {
  display: none;
}

.ms-switch-track {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 16px;
  flex: 0 0 34px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  transition: background .2s ease;
}

.ms-switch-track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.ms-switch-input:checked + .ms-switch-track {
  background: #4c8bf5;
}

.ms-switch-input:checked + .ms-switch-track::before {
  transform: translateX(18px);
}

.ms-switch-state {
  min-width: 22px;
  font-size: 13px;
  line-height: 16px;
  color: #fff;
}

.ms-sound-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.ms-sound-preview {
  min-height: 30px;
  gap: 6px;
  white-space: nowrap;
}

.ms-sound-preview .ms-icon {
  width: 16px;
  height: 16px;
}

.ms-settings-groups {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: -4px;
  padding-left: 8px;
  border-left: 2px solid rgba(90, 179, 255, .25);
}

.ms-settings-groups[hidden] {
  display: none;
}

.ms-friend-group-picker {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  border-radius: var(--br);
  background: rgb(25 40 60);
  border: 1px solid rgba(90, 179, 255, .16);
}

.ms-friend-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
    padding: 8px 0;
  cursor: pointer;
  border-radius: var(--br);
}

.ms-friend-group-head:focus-visible {
  outline: 2px solid rgba(0, 220, 255, .7);
  outline-offset: 2px;
}

.ms-friend-group-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  padding: 2px 2px 0;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: max-height .26s ease, opacity .26s ease, margin-top .26s ease, padding-bottom .26s ease, visibility .2s linear .2s;
}
.ms-friend-group-head[aria-expanded="true"] + .ms-friend-group-body {
    padding-bottom: 8px;
}

.ms-friend-group-picker.is-collapsed .ms-friend-group-body {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: max-height .26s ease, opacity .18s ease, margin-top .26s ease, visibility 0s linear .26s;
}

.ms-friend-group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 5px;
}

.ms-friend-group-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border-radius: var(--br);
  background: rgb(20 30 50);
  box-shadow: 0 0 0 1px rgb(35 120 220 / 20%);
  border: none;
  cursor: pointer;
}

.ms-friend-group-row.is-selected {
  background: rgb(35 120 220 / 20%);
}

.ms-friend-group-row.is-disabled {
  cursor: default;
  opacity: .56;
}

.ms-friend-group-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-group-invite-btn {
  align-self: flex-end;
}

.ms-setting-item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ms-setting-label {
  letter-spacing: 0;
}

.ms-setting-note {
  color: #9d9d9d;
  font-size: 12px;
  letter-spacing: 0;
}

.ms-rename-title {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.ms-member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 6px;
}

.ms-primary-btn,
.ms-danger-btn,
.ms-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 0 0 1px rgb(35 120 220 / 20%);
    border-radius: var(--br);
    padding: 4px 10px;
    background: transparent;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    transition: background .3s ease;
}
.ms-primary-btn[aria-expanded="false"] {
    background: var(--bg-hover-btn);
}
.ms-primary-btn[aria-expanded="false"]:hover {
    background: transparent;
}
.ms-primary-btn[aria-expanded="true"] {
    background: transparent;
}

.ms-primary-btn:hover,
.ms-secondary-btn:hover {
  background: var(--bg-hover-btn);
}

.ms-danger-btn {
    background: rgb(77 31 27 / 50%);
    box-shadow: 0 0 0 1px rgba(255, 99, 71, .35);
}

.ms-danger-btn:hover {
  background: rgb(80 45 45);
}

.ms-secondary-btn.ms-sound-preview {
  padding: 0px 8px;
}

/*.ms-primary-btn:disabled,
.ms-secondary-btn:disabled,
.ms-danger-btn:disabled,*/
.ms-primary-btn.is-disabled,
.ms-secondary-btn.is-disabled,
.ms-danger-btn.is-disabled,
.ms-primary-btn[aria-disabled="true"],
.ms-secondary-btn[aria-disabled="true"],
.ms-danger-btn[aria-disabled="true"] {
  cursor: default;
  opacity: .55;
  transform: none;
}

.ms-group-icon-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: var(--br);
  background: rgb(25 40 60);
  border: 1px solid rgba(255,255,255,.04);
}

.ms-file-btn {
  width: fit-content;
}

.ms-file-btn input {
  display: none;
}

.ms-group-avatar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-group-avatar-editor-layer {
  position: absolute;
  inset:
    calc(8px + env(safe-area-inset-top, 0px))
    calc(8px + env(safe-area-inset-right, 0px))
    calc(8px + env(safe-area-inset-bottom, 0px))
    calc(8px + env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  min-height: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 7, 15, .74);
}

.ms-group-avatar-editor-panel {
  width: min(100%, 420px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(35, 120, 220, .34);
  border-radius: var(--br);
  background: #0b1a2a;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .42);
}

.ms-group-avatar-editor-panel .ms-modal-head,
.ms-group-avatar-editor-panel .ms-modal-actions {
  flex: 0 0 auto;
}

.ms-group-avatar-editor-body {
  min-height: 0;
  overflow: auto;
  padding: 10px 14px;
}

.ms-avatar-editor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.ms-avatar-editor-stage {
  position: relative;
  width: min(70vw, 300px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
  background: #071525;
  border: 1px solid rgba(35, 120, 220, .32);
  touch-action: none;
  cursor: grab;
}

.ms-avatar-editor-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 999px rgba(0, 0, 0, .12), inset 0 0 0 1px rgba(255,255,255,.28);
}

.ms-avatar-editor-stage img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  user-select: none;
  pointer-events: none;
  transform-origin: 0 0;
}

.ms-avatar-zoom {
  width: min(70vw, 300px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #d8e7ff;
}

.ms-avatar-zoom input {
  width: 100%;
}

.ms-empty,
.ms-loading {
  padding: 18px 10px;
  text-align: center;
  color: #a6a6a6;
  letter-spacing: 0;
}

.ms-history-sync-overlay {
  position: absolute;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 20px;
  background: rgb(2 8 15 / 72%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ms-history-sync-overlay[hidden] {
  display: none;
}

.ms-history-sync-card {
  width: min(360px, calc(100% - 24px));
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid rgb(35 120 220 / 32%);
  border-radius: 6px;
  background: rgb(15 25 35 / 92%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
}

.ms-history-sync-label {
  color: #d8e7ff;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.ms-history-sync-progress {
  height: 6px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: rgb(255 255 255 / 10%);
}

.ms-history-sync-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #2378dc;
  transition: width 180ms ease;
}

.ms-call-start-btn[hidden] {
  display: none;
}

.ms-call-start-btn:not(.is-call-active),
.ms-call-start-btn:not(.is-call-active) .ms-icon {
  color: #4fd497;
  stroke: currentColor;
}

.ms-call-start-btn.is-disabled {
  cursor: default;
  opacity: .55;
}

.ms-call-start-btn.is-call-active {
  opacity: 1;
  color: #ffb4a8;
  background: #4d1f1b;
  border-color: rgba(255, 99, 71, .4);
}

.ms-call-start-btn.is-call-active:hover {
  background: #6b261f;
  border-color: rgba(255, 99, 71, .55);
}

.ms-call-start-btn.is-call-active .ms-icon {
  color: #ffb4a8;
}

.ms-call-layer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1600;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.ms-call-layer.has-custom-position {
  right: auto;
  bottom: auto;
}

.ms-call-layer[hidden] {
  display: none;
}

.ms-call-inline {
  flex: 0 0 auto;
}

.ms-call-inline[hidden] {
  display: none;
}

.ms-call-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(83, 211, 147, 0.36);
  border-radius: var(--br);
  background: rgba(25, 91, 63, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  pointer-events: auto;
  cursor: grab;
  user-select: none;
}

.ms-call-layer.is-dragging .ms-call-card {
  cursor: grabbing;
}

.ms-call-card.is-inline {
  border: 1px solid rgba(83, 211, 147, 0.36);
  border-radius: var(--br);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  cursor: default;
  user-select: auto;
}

.ms-call-card.is-incoming {
  border-color: rgba(83, 211, 147, 0.36);
  background: rgba(25, 91, 63, 0.9);
}

.ms-call-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--br);
  overflow: hidden;
  background: transparent;
}

.ms-call-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ms-modal[data-ms-modal-key] > .ms-modal-head > .ms-modal-title {flex:1; text-align:center; min-width:0;}
.ms-modal[data-ms-modal-key] > .ms-modal-head > .ms-overlay-head-spacer {width:32px; flex:none;}

.ms-call-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-call-kicker {
  color: #8ebcf4;
  font-size: 11px;
  line-height: 14px;
}

.ms-call-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.ms-call-status {
  color: #aeb7c4;
  font-size: 12px;
  line-height: 16px;
}

.ms-call-status.is-checking {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ms-call-status-spinner {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  box-sizing: border-box;
  border: 2px solid rgb(174 183 196 / 30%);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ms-call-status-spin 0.75s linear infinite;
}

@keyframes ms-call-status-spin {
  to { transform: rotate(360deg); }
}

.ms-call-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.ms-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid rgba(83, 211, 147, 0.36);
  border-radius: var(--br);
  background: rgba(6, 50, 34, 0.34);
  color: #eaf1fb;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

.ms-call-btn:hover {
  background: transparent;
}

.ms-call-btn--accept {
  background: #1f5134;
  border-color: rgba(52, 211, 153, .36);
}

.ms-call-btn--accept:hover {
  background: #276640;
}

.ms-call-btn--danger {
  background: #9F3028;
  border-color: rgba(255, 99, 71, .4);
}

.ms-call-btn--danger:hover {
  background: #6b261f;
}

.ms-call-btn.is-muted {
  border-color: rgba(255, 99, 71, .35);
    background: rgb(159 48 40 / 36%);
}
.ms-call-btn.is-muted .ms-icon {
  color: #fff;
}

.ms-call-open-chat {
  color: #8ebcf4;
}


@media (max-width: 768px) {
  .ms-shell {
    grid-template-columns: 1fr;
    height: calc(100dvh - 40px);
  }

  .ms-resize-handle {
    display: none;
  }

  .ms-shell.is-mobile-chat .ms-panel--list {
    display: none;
  }

  .ms-shell:not(.is-mobile-chat) .ms-panel--chat {
    display: none;
  }

  .ms-back-btn {
    display: inline-flex;
  }

  .ms-message {
    max-width: 90%;
  }

  .ms-call-layer:not(.has-custom-position) {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .ms-message-tools {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none) {
  .ms-resize-handle {
    display: none;
  }

  .ms-message-tools {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (pointer: coarse) {
  .ms-resize-handle {
    display: none;
  }
}

@media (max-width: 520px) {
  .ms-shell {
    min-height: 400px;
  }

  .ms-forward-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ms-panel {
    border-radius: 0;
  }

  .ms-chat-head {
    grid-template-columns: auto 36px minmax(0, 1fr) auto;
  }

  .ms-chat-actions {
    gap: 4px;
  }
}

.ms-message-pinned {
  display: inline-flex;
  align-items: center;
  color: #7fd7ff;
}

.ms-message-pinned .ms-icon {
  width: 12px;
  height: 12px;
}

.ms-pinned-banner {
  flex: 0 0 auto;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
  min-height: 48px;
  box-sizing: border-box;
  border-bottom: 1px solid rgb(35 120 220 / 18%);
  background: rgb(18 34 48 / 80%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 0 2px 5px rgb(0 0 0 / 24%);
}

.ms-pinned-banner[hidden] {
  display: none;
}

.ms-pinned-banner-main,
.ms-pinned-banner-action,
.ms-pinned-panel-back,
.ms-pinned-panel-jump,
.ms-pinned-panel-promote,
.ms-pinned-panel-select,
.ms-pinned-panel-unpin-all {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.ms-pinned-banner-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 6px 4px 6px 12px;
  color: #f5f8fc;
  background: transparent;
  text-align: left;
}

.ms-pinned-banner-segments {
  align-self: center;
  width: 3px;
  height: 34px;
  overflow: hidden;
  border-radius: 2px;
}

.ms-pinned-banner-segments-track {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 3px;
  height: 100%;
  transform: translateY(calc(var(--ms-pinned-segment-offset, 0) * -9px));
  transition: transform .2s ease;
}

.ms-pinned-banner-segment {
  flex: 1 1 0;
  min-height: 2px;
  border-radius: 2px;
  background: rgb(35 120 220 / 42%);
  transition: background-color .18s ease;
}

.ms-pinned-banner-segment.is-active {
  background: #5eb7ff;
}

.ms-pinned-banner-segments.is-overflowing .ms-pinned-banner-segments-track {
  height: auto;
}

.ms-pinned-banner-segments.is-overflowing .ms-pinned-banner-segment {
  flex: 0 0 7px;
  height: 7px;
}

.ms-pinned-banner-content {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  will-change: transform;
}

.ms-pinned-banner-content.has-media {
  grid-template-columns: auto minmax(0, 1fr);
}

.ms-pinned-banner-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ms-pinned-banner-copy strong,
.ms-pinned-banner-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-pinned-banner-copy strong {
  color: #5eb7ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}

.ms-pinned-banner-copy span {
  color: #f4f7fb;
  font-size: 12px;
  line-height: 16px;
}

.ms-pinned-media {
  display: block;
  width: 34px;
  min-width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 4px;
  background: rgb(7 18 29);
}

.ms-pinned-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ms-pinned-banner-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  padding: 0;
  color: #91a7bb;
  background: transparent;
}

.ms-pinned-banner-action:hover,
.ms-pinned-banner-action:focus-visible {
  color: #5eb7ff;
  background: rgb(35 120 220 / 12%);
}

.ms-pinned-banner-action .ms-icon {
  width: 21px;
  height: 21px;
}

.ms-pinned-panel {
  position: absolute;
  inset: 0;
  z-index: 40;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgb(12 24 36);
  transform: translateX(102%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .28s ease, visibility 0s linear .28s;
}

.ms-pinned-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .28s ease;
}

.ms-pinned-panel-head {
    flex: 0 0 auto;
    min-height: calc(50px + max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px)));
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px)) 10px 0px;
    box-sizing: border-box;
    background: rgb(19 31 46);
    align-items: center;
}

.ms-pinned-panel-back {
  padding: 0;
}

.ms-pinned-panel-back .ms-icon {
  width: 20px;
  height: 20px;
}

.ms-pinned-panel-title {
  min-width: 0;
  overflow: hidden;
  color: #f4f8fc;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-pinned-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 10px 14px;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.ms-pinned-panel-body.has-message-items::before {
  content: "";
  margin-top: auto;
}

.ms-pinned-panel-empty {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8294a7;
  font-size: 13px;
}

.ms-pinned-panel-message {
  cursor: pointer;
}

.ms-pinned-panel-message.has-trailing-action:not(.is-mine).has-message-avatar {
  grid-template-columns: 30px minmax(0, auto) 34px;
}

.ms-pinned-panel-message.has-trailing-action:not(.is-mine):not(.has-message-avatar) {
  grid-template-columns: minmax(0, auto) 34px;
}

.ms-pinned-panel-message.has-trailing-action.is-mine {
  grid-template-columns: 34px minmax(0, auto);
}

.ms-pinned-panel-message.has-trailing-action.is-mine .ms-message-main {
  grid-column: 2;
  grid-row: 1;
}

.ms-pinned-panel-message.has-trailing-action.is-mine .ms-pinned-panel-promote,
.ms-pinned-panel-message.has-trailing-action.is-mine .ms-pinned-panel-select {
  grid-column: 1;
  grid-row: 1;
}

.ms-pinned-panel-message .ms-message-tools {
  display: none;
}

.ms-pinned-panel-jump,
.ms-pinned-panel-promote,
.ms-pinned-panel-select {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  color: #e7f3ff;
  background: rgb(31 51 68);
  box-shadow: 0 2px 6px rgb(0 0 0 / 22%);
}

.ms-pinned-panel-jump:hover,
.ms-pinned-panel-jump:focus-visible,
.ms-pinned-panel-promote:hover,
.ms-pinned-panel-promote:focus-visible,
.ms-pinned-panel-select:hover,
.ms-pinned-panel-select:focus-visible {
  color: #fff;
  background: #2378dc;
}

.ms-pinned-panel-jump .ms-icon,
.ms-pinned-panel-promote .ms-icon {
  width: 16px;
  height: 16px;
}

.ms-pinned-panel-select span {
  width: 15px;
  height: 15px;
  box-sizing: border-box;
  border: 2px solid #91a7bb;
  border-radius: 50%;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ms-pinned-panel-select[aria-pressed="true"] span {
  border-color: #53d393;
  background: #53d393;
  box-shadow: inset 0 0 0 3px rgb(31 51 68);
}

.ms-pinned-panel-message.is-selected .ms-bubble {
  box-shadow: 0 0 0 1px rgb(83 211 147 / 72%), 0 4px 14px rgb(0 0 0 / 18%);
}

.ms-pinned-scope {
  margin-right: 3px;
  color: #8fb5d8;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.ms-pinned-scope.is-shared {
  color: #53d393;
}

.ms-pinned-panel-footer {
  flex: 0 0 auto;
  padding: 0 10px 8px;
  border-top: 1px solid rgb(35 120 220 / 18%);
  background: rgb(15 25 35 / 96%);
}

.ms-pinned-panel-footer[hidden] {
  display: none;
}

.ms-pinned-panel-unpin-all {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #5eb7ff;
  font-size: 18px;
  font-weight: 400;
  background: transparent;
}

.ms-pinned-panel-unpin-all:hover,
.ms-pinned-panel-unpin-all:focus-visible {
  color: #fff;
  background: rgb(35 120 220 / 12%);
}

.ms-pinned-panel-unpin-all:disabled {
  opacity: .55;
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  .ms-pinned-banner-segments-track {
    transition: none;
  }
}
/* APN Chats personal contacts directory. */
.ms-contacts-page {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  background: transparent;
}

.ms-contacts-page[hidden] { display: none !important; }

.ms-contacts-page__head {
  display: grid;
  box-sizing: border-box;
  height: var(--ms-workspace-header-height, 51px);
  min-height: var(--ms-workspace-header-height, 51px);
  flex: 0 0 auto;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 4px 10px;
  border-bottom: 1px solid rgb(35 120 220 / 22%);
}

.ms-contacts-page__head h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  text-align: center;
}

.ms-contacts-page__menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.ms-contacts-page__menu-toggle {
  width: 30px;
  height: 30px;
  min-width: 30px;
}

.ms-contacts-page__menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 40;
  width: 190px;
  padding: 5px;
  border: 1px solid rgb(35 120 220 / 32%);
  border-radius: 12px;
  background: rgb(10 25 40 / 97%);
  box-shadow: 0 12px 28px rgb(0 0 0 / 42%);
}

.ms-contacts-page__menu[hidden] { display: none !important; }

.ms-contacts-page__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ff7474;
  cursor: pointer;
  text-align: left;
}

.ms-contacts-page__menu .ms-icon { width: 18px; height: 18px; }

.ms-contacts-page__body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.ms-contacts-search-wrap { padding: 12px 16px 5px; }
.ms-contacts-search-wrap .ms-search { width: 100%; }

.ms-contacts-directory {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding: 8px 16px 24px;
}

.ms-contact-card {
  display: grid;
  position: relative;
  grid-template-columns: 32px minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgb(35 120 220 / 22%);
  border-radius: 5px;
  background: rgb(30 40 60 / 15%);
}

.ms-contact-card__avatar {
  position: relative;
  width: 32px;
  height: 32px;
}

.ms-contact-card__avatar img,
.ms-contact-edit__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
}

.ms-contact-card__main { min-width: 0; }
.ms-contact-card__name {
  overflow: hidden;
  color: #eef4fb;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-contact-card__status {
    line-height: 1.6;
    color: #7f8da0;
    font-size: 10px;
}
.ms-contact-card__status.is-online { color: #42c987; }

.ms-contact-card__actions { display: flex; gap: 6px; align-items: center; }
.ms-contact-card__action {
  display: inline-flex;
  min-width: 64px;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgb(35 120 220 / 30%);
  border-radius: 6px;
  background: rgb(10 25 40 / 35%);
  color: #d9e7f6;
  cursor: pointer;
}
.ms-contact-card__action .ms-icon { width: 18px; height: 18px; }
.ms-contact-card__action span { font-size: 11px; }
.ms-contact-card__action:disabled { opacity: .45; cursor: default; }

.ms-contact-card__action[data-ms-contact-message],
.ms-contact-card__action[data-ms-contact-message] .ms-icon {
  color: #72bfff;
  stroke: currentColor;
}

.ms-contact-card__action[data-ms-contact-call],
.ms-contact-card__action[data-ms-contact-call] .ms-icon {
  color: #4fd497;
  stroke: currentColor;
}

.ms-contact-card__menu-wrap { position: relative; }
.ms-contact-card__more {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #d9e7f6;
  cursor: pointer;
}

.ms-contact-card__menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 25;
  width: 180px;
  padding: 5px;
  border: 1px solid rgb(35 120 220 / 32%);
  border-radius: var(--br);
  background: rgb(10 25 40 / 96%);
  box-shadow: 0 12px 28px rgb(0 0 0 / 38%);
}
.ms-contact-card__menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e5edf7;
  cursor: pointer;
  text-align: left;
}
.ms-contact-card__menu button .ms-icon { width: 17px; height: 17px; }
.ms-contact-card__menu button.is-danger { color: #ff7474; }

.ms-contact-edit {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ms-contact-edit__avatar {
  width: 104px;
  height: 104px;
  align-self: center;
  border-radius: 14px;
  background: rgb(10 25 40 / 35%);
}
.ms-contact-edit__avatar-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ms-contact-edit__field { display: flex; min-width: 0; flex-direction: column; gap: 3px; padding: 10px 15px; color: rgb(190 204 222 / 45%); font-size: 12px; line-height: 18px; }
.ms-contact-edit .ms-contact-edit__field input {
  box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0;
  min-height: 0; height: auto; margin: 0; padding: 0;
  border: 0; border-bottom: 1px solid transparent; border-radius: 0;
  outline: none; box-shadow: none; background: transparent;
  color: #eef4fb; font: inherit; font-size: 14px; font-weight: 500; line-height: 1.45;
}
.ms-contact-edit .ms-contact-edit__field input:focus { border-bottom-color: #2378dc; background: transparent; outline: none; box-shadow: none; }
.ms-contact-edit > .ms-setting-note { padding: 0 15px; color: #91a0b5; line-height: 17px; }

@media (max-width: 850px) {
  .ms-contact-card { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .ms-contact-card__actions { justify-content: flex-end; }
  .ms-contact-card__action {
    width: 32px;
    min-width: 32px;
    padding: 0;
  }
    .ms-contact-card__action span { display: none; }
}

.ms-call-identity {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.ms-call-identity .ms-call-title {
  min-width: 0;
  max-width: 65%;
  flex: 0 0 auto;
}
.ms-call-identity .ms-call-title:only-child {
  max-width: 100%;
}
.ms-call-profile-name {
  min-width: 0;
  flex: 0 1 auto;
  margin: 0;
  color: #9cb1c6;
  font-size: 10px;
  line-height: 16px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Direct conversations are immutable one-to-one chats. Their details page also
   serves as the shared-content archive on both the web and mobile clients. */
.ms-modal.ms-direct-info-modal {
  position: relative;
  width: min(760px, 100%);
  height: min(850px, 100%);
  max-height: min(850px, 100%);
}
.ms-direct-info-modal .ms-modal-title { will-change: opacity; }
.ms-direct-info-morph {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  contain: layout paint;
}
.ms-direct-info-morph-avatar {
  position: absolute;
  transform-origin: center center;
  will-change: opacity, transform;
}
.ms-direct-info-morph-avatar-source { transform-origin: center bottom; }
.ms-direct-info-morph-source-clip {
  position: absolute;
  inset: 0;
  clip-path: inset(var(--ms-direct-info-head-bottom, 54px) 0 0);
}
.ms-direct-info-morph-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ms-direct-info-morph-avatar-source img { border-radius: 14px; }
.ms-direct-info-morph-avatar-target img { border-radius: 9px; }
.ms-direct-info-morph-copy { position: static; }
.ms-direct-info-header-contact {
  display: inline-flex;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  color: rgb(190 204 222 / 76%);
  opacity: 0;
}
.ms-direct-info-header-contact-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ms-direct-info-header-contact-separator { flex: 0 0 auto; }
.ms-direct-info-morph-copy strong,
.ms-direct-info-morph-copy .ms-direct-info-morph-contact-name,
.ms-direct-info-morph-copy small {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  display: block;
  white-space: nowrap;
  text-align: left;
  transform-origin: left top;
  will-change: transform;
}
.ms-direct-info-morph-copy strong { color: #f5f8fc; font-size: 24px; font-weight: 600; line-height: 29px; }
.ms-direct-info-morph-copy .ms-direct-info-morph-contact-name { color: rgb(190 204 222 / 76%); font-size: 14px; line-height: 18px; }
.ms-direct-info-morph-copy small { color: rgb(190 204 222 / 62%); font-size: 14px; font-weight: 400; line-height: 18px; }
.ms-direct-info-morph-copy small.is-online { color: #57d894; }
.ms-direct-info-modal .ms-modal-body { padding: 0; overflow: hidden; }
.ms-direct-info {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.ms-direct-info-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 18px 20px;
  text-align: center;
}
.ms-direct-info-identity {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
}
.ms-direct-info-modal.is-direct-info-morph-ready .ms-direct-info-identity { opacity: 0; }
.ms-direct-info-avatar {
  position: relative;
  width: 124px;
  height: 124px;
}
.ms-direct-info-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: contain;
}
.ms-direct-info-avatar .ms-presence {
  right: 1px;
  bottom: 4px;
  width: 16px;
  height: 16px;
}
.ms-direct-info-profile h2 {
  max-width: 100%;
  margin: 15px 0 2px;
  overflow: hidden;
  color: #f5f8fc;
  font-size: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-direct-info-contact-name {
  max-width: 100%;
  overflow: hidden;
  color: rgb(190 204 222 / 76%);
  font-size: 14px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-direct-info-presence { color: rgb(190 204 222 / 62%); font-size: 14px; }
.ms-direct-info-presence.is-online { color: #57d894; }
.ms-direct-info-actions {
  width: min(360px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.ms-direct-info-action {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgb(35 120 220 / 22%);
  border-radius: 10px;
  background: rgb(25 45 67 / 78%);
  color: #72bfff;
  cursor: pointer;
}
.ms-direct-info-action .ms-icon { width: 25px; height: 25px; }
.ms-direct-info-action[data-ms-direct-info-call] { color: #55d99a; }
.ms-direct-info-action.is-muted { color: #ff8a7a; }

/* Group info reuses the direct profile geometry; subpages keep the media DOM mounted. */
.ms-direct-info-profile { position: relative; }
.ms-direct-info-action:disabled { opacity: .45; cursor: default; }
.ms-group-info-navigation {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgb(35 120 220 / 18%);
  border-radius: 10px;
  background: rgb(8 23 39 / 58%);
}
.ms-group-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #eef4fb;
  text-align: left;
  cursor: pointer;
}
.ms-group-info-row + .ms-group-info-row { border-top: 1px solid rgb(116 145 177 / 13%); }
.ms-group-info-row > span { flex: 1; }
.ms-group-info-row small { color: rgb(190 204 222 / 62%); }
.ms-group-info-row .ms-icon { flex: 0 0 22px; width: 22px; height: 22px; }
.ms-group-info-row:disabled { opacity: .45; cursor: default; }
.ms-group-info-row:not(:disabled):hover { background: rgb(35 120 220 / 12%); }
.ms-group-info-identity { width: 100%; }
.ms-group-info-avatar-wrap { position: relative; width: 124px; height: 124px; flex: 0 0 auto; }
.ms-group-info-name-row { position: relative; display: flex; align-items: center; justify-content: center; width: min(560px, 100%); min-height: 34px; margin: 15px 0 2px; }
.ms-group-info-name-label { position: relative; min-width: 0; max-width: calc(100% - 72px); }
.ms-direct-info-profile .ms-group-info-name-row h2 { margin: 0; min-width: 0; max-width: 100%; }
.ms-group-name-edit, .ms-group-menu-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 4px; border: 0; border-radius: 10px; background: transparent; color: #d8e7f6; cursor: pointer; }
.ms-group-name-edit { position: absolute; z-index: 5; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); color: #5d5d5d; box-shadow: none; }
.ms-group-name-edit .ms-icon { width: 18px; height: 18px; color: #5d5d5d; }
.ms-group-menu-toggle .ms-icon { width: 22px; height: 22px; }
.ms-group-menu-toggle:hover, .ms-group-menu-toggle.is-active { background: rgb(35 120 220 / 20%); }
.ms-group-name-edit:hover { color: #fff; background: transparent; box-shadow: none; }
.ms-group-name-edit:hover .ms-icon { color: #fff; }
.ms-group-name-edit:focus-visible, .ms-group-name-cancel:focus-visible { outline: 2px solid #2378dc; outline-offset: 2px; }
.ms-group-avatar-actions-inline { position: absolute; right: -4px; bottom: -4px; z-index: 6; }
.ms-group-avatar-actions-inline > .ms-group-menu-toggle { background: rgb(27 56 92 / 70%); }
.ms-group-info-tools { position: absolute; right: 18px; top: 16px; z-index: 6; }
.ms-group-menu { position: absolute; z-index: 7; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; gap: 4px; min-width: 170px; padding: 6px; border: 1px solid rgb(255 255 255 / 8%); border-radius: 10px; background: #0f1e30; box-shadow: 0 12px 30px rgb(0 0 0 / 34%); opacity: 0; visibility: hidden; pointer-events: none; transform: scale(.94); transform-origin: top right; transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s; }
.ms-group-avatar-actions-inline .ms-group-menu { top: auto; bottom: 40px; transform-origin: bottom right; }
.ms-group-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1); transition-delay: 0s; }
.ms-group-menu button, .ms-group-menu [role="button"] { box-sizing: border-box; display: flex; align-items: center; width: 100%; min-height: 34px; padding: 7px 10px; margin: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: #edf4fa; font: inherit; font-size: 13px; font-weight: 400; text-align: left; white-space: nowrap; cursor: pointer; }
.ms-group-menu .is-danger, .ms-group-menu .ms-danger-btn { color: #ff8a7a; }
.ms-group-menu button, .ms-group-menu [role="button"] { justify-content: flex-start; }
.ms-group-menu button:hover, .ms-group-menu [role="button"]:hover { background: rgb(35 120 220 / 20%); }
.ms-group-name-form { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; align-items: center; width: max-content; min-width: 1.5em; max-width: calc(100% - 196px); margin: 0; }
.ms-group-name-form[hidden], .ms-group-name-error[hidden] { display: none; }
.ms-group-name-measure, .ms-group-name-form input { grid-area: 1 / 1; box-sizing: border-box; padding: 0px 2px; font: inherit; letter-spacing: inherit; }
.ms-group-name-measure { visibility: hidden; white-space: pre; overflow: hidden; pointer-events: none; }
.ms-group-name-form input { width: 0; min-width: 100%; min-height: 0; border: 0; border-bottom: 1px solid #71869c; border-radius: 0; background: transparent; box-shadow: none; outline: none; color: #edf4fa; }
.ms-group-name-form input:focus { border-bottom-color: #2378dc; background: transparent; box-shadow: none; outline: none; }
.ms-group-name-actions { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); display: flex; align-items: stretch; gap: 4px; }
.ms-group-name-form button { box-sizing: border-box; flex: 0 0 auto; padding: 6px 10px; white-space: nowrap; }
.ms-group-name-form .ms-group-name-cancel { display: inline-flex; align-items: center; justify-content: center; width: 30px; padding: 4px; border: 0; border-radius: var(--br); background: rgb(77 31 27 / 50%); box-shadow: 0 0 0 1px rgb(255 99 71 / 35%); color: #ed8c85; cursor: pointer; }
.ms-group-name-cancel .ms-icon { width: 20px; height: 20px; color: inherit; }
.ms-group-name-form .ms-group-name-cancel:hover { color: #ffaaa2; background: rgb(80 45 45); }
.ms-group-name-form button:disabled { opacity: .5; cursor: default; }
.ms-group-name-error { position: absolute; top: calc(100% + 3px); left: 0; right: 0; color: #ff8a7a; font-size: 12px; line-height: 15px; }

.ms-group-create-description-wrap { display: grid; flex: 0 0 auto; min-width: 0; margin: 8px 0 12px; }
.ms-group-create-description-wrap > .ms-group-create-description,
.ms-group-create-description-size { grid-area: 1 / 1; box-sizing: border-box; width: 100%; min-width: 0; min-height: 26px; margin: 0; padding: 4px 8px; border: 0; border-radius: var(--br); font: inherit; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ms-group-create-description-wrap > .ms-group-create-description { display: block; height: 100%; overflow: hidden; resize: none; background: rgb(10 25 40); color: #edf4fa; }
.ms-group-create-description-size { visibility: hidden; pointer-events: none; }
.ms-group-description { box-sizing: border-box; width: min(560px, 100%); margin-top: 18px; padding: 10px 14px; border: 1px solid #163951; border-radius: 10px; background: #0b1a27; text-align: left; min-width: 0; }
.ms-group-description-heading { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: #91a4b8; font-size: 13px; line-height: 1.5; }
.ms-group-description-edit { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-block: -6px; padding: 4px; border: 0; border-radius: 10px; box-shadow: none; background: transparent; color: #5d5d5d; cursor: pointer; }
.ms-group-description-edit .ms-icon { width: 18px; height: 18px; color: inherit; }
.ms-group-description-edit:hover { color: #fff; background: transparent; box-shadow: none; }
.ms-group-description-edit:focus-visible { outline: 2px solid #2378dc; outline-offset: 2px; }
.ms-group-description-text { color: #edf4fa; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ms-group-description-text.is-empty { color: #91a4b8; }
.ms-group-description-form { display: grid; gap: 8px; margin: 0; }
.ms-group-description-form[hidden], .ms-group-description-text[hidden], .ms-group-description-edit[hidden], .ms-group-description-error[hidden] { display: none; }
.ms-group-description-form textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 0px 2px; border: 0; border-bottom: 1px solid #71869c; border-radius: 0; box-shadow: none; background: transparent; color: #edf4fa; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; outline: none; }
.ms-group-description-form textarea:focus { border-bottom-color: #2378dc; box-shadow: none; background: transparent; outline: none; }
.ms-group-description-autogrow { display: grid; min-width: 0; font-size: 14px; line-height: 1.5; }
.ms-group-description-autogrow::after { content: attr(data-text) " "; visibility: hidden; pointer-events: none; grid-area: 1 / 1; box-sizing: border-box; padding: 0px 2px; border-bottom: 1px solid transparent; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.ms-group-description-autogrow textarea { grid-area: 1 / 1; height: 100%; min-height: 0; margin: 0; resize: none; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.ms-group-description-actions { display: flex; align-items: stretch; justify-content: flex-end; gap: 4px; }
.ms-group-description-form button { box-sizing: border-box; flex: 0 0 auto; min-height: 0; padding: 6px 10px; white-space: nowrap; }
.ms-group-description-form .ms-group-name-cancel { display: inline-flex; align-items: center; justify-content: center; width: 30px; padding: 4px; border: 0; border-radius: var(--br); background: rgb(77 31 27 / 50%); box-shadow: 0 0 0 1px rgb(255 99 71 / 35%); color: #ed8c85; cursor: pointer; }
.ms-group-description-form .ms-group-name-cancel:hover { color: #ffaaa2; background: rgb(80 45 45); }
.ms-group-description-form button:disabled { opacity: .5; cursor: default; }
.ms-group-description-error { color: #ff8a7a; font-size: 12px; line-height: 1.4; }
.ms-direct-info.is-group-name-editing { overflow-y: hidden; }
.ms-direct-info-modal.is-direct-info-morph-ready .ms-group-info-identity { opacity: 1; }
.ms-direct-info-modal.is-direct-info-morph-ready .ms-group-info-identity .ms-direct-info-avatar,
.ms-direct-info-modal.is-direct-info-morph-ready .ms-group-info-name-row h2,
.ms-direct-info-modal.is-direct-info-morph-ready .ms-group-info-identity .ms-direct-info-presence { opacity: 0; }
.ms-direct-info-modal.is-group-name-editing .ms-direct-info-morph-copy strong,
.ms-direct-info-modal.is-group-name-editing .ms-direct-info-morph-copy small { visibility: hidden; }
.ms-group-member-section + .ms-group-member-section { margin-top: 20px; }
.ms-group-member-section .ms-member-row + .ms-member-row { margin-top: 5px; }
.ms-group-member-section h4 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid rgb(116 145 177 / 20%); color: #88a4be; font-size: 12px; font-weight: 600; letter-spacing: .03em; }
@media (prefers-reduced-motion: reduce) { .ms-group-menu { transition: none; } }
.ms-direct-info-modal .ms-modal-body { position: relative; }
.ms-group-info-page {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  padding: 18px;
  animation: ms-group-info-enter .18s ease-out;
}
.ms-group-info-page-title { margin: 0 0 16px; font-size: 16px; color: #eef4fb; }
.ms-group-info-page .ms-contact-list, .ms-group-info-page .ms-member-list { max-height: none; overflow: visible; }
.ms-group-info-page .ms-modal-search { box-sizing: border-box; width: 100%; margin-bottom: 12px; }
.ms-group-info-page .ms-friend-group-picker { margin-bottom: 12px; }
.ms-group-info-page .ms-member-row { flex-wrap: wrap; }
.ms-group-info-page .ms-member-actions { margin-left: auto; flex-wrap: wrap; }
.ms-direct-info-modal.is-group-info-subpage .ms-direct-info { visibility: hidden; }
.ms-direct-info-modal.is-group-info-subpage .ms-modal-head [data-ms-group-info-back] {
  /* Keep the button in the flex flow so the header retains its normal height. */
  order: -1;
}
@keyframes ms-group-info-enter { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .ms-group-info-page { animation: none; } }
.ms-direct-info-fields {
  width: min(560px, 100%);
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgb(35 120 220 / 18%);
  border-radius: 10px;
  background: rgb(8 23 39 / 58%);
  text-align: left;
}
.ms-direct-info-field { display: flex; flex-direction: column; gap: 3px; padding: 10px 15px; }
.ms-direct-info-field + .ms-direct-info-field { border-top: 1px solid rgb(116 145 177 / 13%); }
.ms-direct-info-field strong { color: #eef4fb; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.45; }
.ms-direct-info-field span { color: rgb(190 204 222 / 45%); font-size: 12px; }
.ms-direct-info-field .ms-profile-age { color: #91a0b5; font-size: 12px; font-weight: 400; white-space: nowrap; }
.ms-settings-sections { display: flex; flex-direction: column; gap: 12px; }
.ms-settings-block { overflow: hidden; border: 1px solid rgba(255,255,255,.055); border-radius: 10px; background: #122032; }
.ms-settings-block > h3 { margin: 0; padding: 11px 12px 7px; color: #5ab3ff; font-size: 13px; line-height: 18px; font-weight: 650; }
.ms-settings-block > .ms-setting-row { padding: 10px 12px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,.055); background: transparent; }
.ms-settings-block .ms-setting-item { min-width: 0; flex-direction: column; align-items: flex-start; gap: 3px; }
.ms-settings-block .ms-setting-note { color: #91a0b5; line-height: 17px; }
.ms-settings-block .ms-setting-select { min-width: 0; max-width: 100%; padding: 5px 8px; border: 1px solid rgb(35 120 220 / 20%); border-radius: 5px; background: #0c1b2b; color: #eef4fb; font: inherit; }
.ms-settings-block > :last-child { border-bottom: 0; }
.ms-settings-block .ms-settings-groups { margin: 0 10px 10px; }
.ms-setting-row--privacy { align-items: center; }
.ms-privacy-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ms-settings-block .ms-privacy-select { width: 112px; max-width: 100%; min-width: 0; min-height: 0; height: auto; box-sizing: border-box; margin: 0; padding: 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; outline: none; box-shadow: none; background: transparent; color: #eef4fb; color-scheme: dark; font: inherit; font-size: 14px; font-weight: 500; line-height: 1.45; }
.ms-settings-block .ms-privacy-select:focus { border-bottom-color: #2378dc; outline: none; box-shadow: none; background: transparent; }
.ms-settings-block .ms-privacy-select option { color: #eef4fb; background: #0c1b2b; }
.ms-setting-row--privacy > .ms-privacy-groups { grid-column: 1 / -1; width: 100%; box-sizing: border-box; margin: 0; }
.ms-privacy-select[hidden], .ms-privacy-groups[hidden] { display: none !important; }
.ms-direct-info-tabs {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 5px 8px;
  border-block: 1px solid rgb(35 120 220 / 18%);
  background: rgb(10 25 40 / 97%);
  box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
  scrollbar-width: none;
}
.ms-direct-info-tabs::-webkit-scrollbar { display: none; }
.ms-direct-info-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgb(220 231 244 / 58%);
  cursor: pointer;
  white-space: nowrap;
}
.ms-direct-info-tab.is-active { background: rgb(69 102 166 / 34%); color: #86a8ff; }
.ms-direct-info-tab small { color: currentColor; font-size: 10px; opacity: .78; }
.ms-direct-info-library { box-sizing: border-box; min-height: max(300px, var(--ms-direct-info-library-height, 300px)); padding: 10px 10px 28px; }
.ms-direct-info-date-group { position: relative; padding-top: 4px; }
.ms-direct-info-date {
  position: sticky;
  top: 61px;
  z-index: 9;
  width: max-content;
  max-width: 55%;
  margin: 0 7px 7px auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgb(34 57 82 / 93%);
  color: rgb(229 238 248 / 74%);
  font-size: 11px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}
.ms-direct-info-items { display: grid; gap: 7px; }
.ms-direct-info-items.is-media { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ms-direct-info-item { min-width: 0; overflow: hidden; border-radius: 10px; }
.ms-direct-info-items.is-media .ms-direct-info-item { aspect-ratio: 1; background: rgb(3 13 24 / 65%); }
.ms-direct-info-items.is-media .ms-direct-info-item.is-youtube {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  padding: 9px;
  border: 1px solid rgb(35 120 220 / 17%);
  background: rgb(8 23 39 / 55%);
}
.ms-direct-info-items.is-media .ms-message-attachments,
.ms-direct-info-items.is-media .ms-message-attachment,
.ms-direct-info-items.is-media .ms-media-frame,
.ms-direct-info-items.is-media .ms-message-media-link,
.ms-direct-info-items.is-media .ms-message-media,
.ms-direct-info-items.is-media video { width: 100%; height: 100%; margin: 0; }
.ms-direct-info-items.is-media .ms-message-attachment--media { max-width: 100%; --maxMediaW: 100%; }
.ms-direct-info-items.is-media .ms-media-frame[data-ms-media-kind][data-ms-ratio-known]:not(.is-compact) {
  width: 100%;
  max-width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.ms-direct-info-items.is-media .ms-message-media { object-fit: contain; object-position: center; }
.ms-direct-info-items:not(.is-media) .ms-direct-info-item {
  padding: 10px;
  border: 1px solid rgb(35 120 220 / 17%);
  background: rgb(8 23 39 / 55%);
}
.ms-direct-info-item .ms-message-attachments { margin: 0; }
.ms-direct-info-items:is(.is-audio, .is-files, .is-links, .is-voice) .ms-direct-info-item { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
.ms-direct-info-items:is(.is-files, .is-voice) .ms-message-attachments { min-width: 0; max-width: 100%; }
.ms-direct-info-items.is-voice .ms-message-attachments,
.ms-direct-info-items.is-voice .ms-message-attachment--voice { width: 100%; max-width: none; min-width: 0; }
.ms-direct-info-items.is-voice .ms-voice-player { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
.ms-direct-info-items.is-audio .ms-message-attachments,
.ms-direct-info-items.is-audio .ms-message-attachment--audio { width: 100%; max-width: none; min-width: 0; }
.ms-direct-info-items.is-audio .ms-audio-player { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
.ms-direct-info-items:is(.is-audio, .is-voice) .ms-voice-wave { width: 100%; }
.ms-playback-wave { display: block; width: 100%; height: 28px; overflow: hidden; pointer-events: none; }
.ms-playback-wave-base { fill: rgb(135 135 135); color: rgb(135 135 135); }
.ms-playback-wave-played { fill: #2378dc; color: #2378dc; }
.ms-direct-info.is-profile-loading { position: relative; overflow: hidden; }
.ms-direct-info.is-profile-loading > [data-ms-direct-info-profile],
.ms-direct-info.is-profile-loading > [data-ms-direct-info-content] { visibility: hidden; pointer-events: none; }
.ms-direct-info-profile-loading { display: none; }
.ms-direct-info.is-profile-loading > .ms-direct-info-profile-loading { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; }
.ms-direct-info-show-message { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; border: 1px solid rgb(35 120 220 / 25%); border-radius: 10px; background: rgb(35 120 220 / 10%); color: #e7edf7; cursor: pointer; }
.ms-direct-info-show-message:hover { background: rgb(35 120 220 / 22%); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ms-direct-info-show-message { transition: background-color 160ms ease; }
}
.ms-direct-info-show-message:focus-visible { outline: 2px solid #68b9f8; outline-offset: 2px; }
.ms-direct-info-link { min-width: 0; display: flex; align-items: center; gap: 10px; color: #e7f0fa; text-decoration: none; }
.ms-direct-info-link > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ms-direct-info-link strong { font-size: 13px; font-weight: 500; }
.ms-direct-info-link small { overflow: hidden; color: #71baff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ms-direct-info-link-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: rgb(35 120 220 / 16%); color: #72bfff; }
.ms-direct-info-youtube { width: 100%; }
.ms-direct-info-youtube-link { display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: inherit; text-decoration: none; cursor: pointer; }
.ms-direct-info-item.is-youtube .ms-youtube-mini-card {
  width: 100%;
  grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
  gap: 11px;
  text-align: left;
}
.ms-direct-info-item.is-youtube .ms-youtube-mini-media {
  position: relative;
  width: 100%;
  border-radius: 8px;
}
.ms-direct-info-item.is-youtube .ms-youtube-mini-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}
.ms-direct-info-item.is-youtube .ms-youtube-mini-desc[hidden] { display: none; }
.ms-direct-info-item.is-youtube .ms-youtube-mini-media::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(7 14 24 / 72%);
  box-shadow: 0 2px 10px rgb(0 0 0 / 30%);
  transform: translate(-50%, -50%);
}
.ms-direct-info-item.is-youtube .ms-youtube-mini-media::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: calc(50% + 2px);
  top: 50%;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #fff;
  transform: translate(-50%, -50%);
}
.ms-direct-info-empty { padding: 74px 18px; color: rgb(190 204 222 / 45%); text-align: center; }
.ms-direct-info-load-status { min-height: 52px; }
.ms-direct-info-loading { line-height: 16px; }
.ms-direct-info-loading,
.ms-direct-info-load-error { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; color: rgb(190 204 222 / 56%); font-size: 12px; }
.ms-direct-info-load-error { color: #ff8f8f; }

@media (prefers-reduced-motion: reduce) {
  .ms-direct-info-morph,
  .ms-direct-info-identity { will-change: auto; }
}

@media (min-width: 680px) {
  .ms-direct-info-items.is-media { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
