.ms-shell {
  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;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 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-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;
}

.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-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 10px;
    padding: 4px 0;
}
.ms-chat-head-left {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding-left: 10px;
}
.ms-chat-actions {
    padding-right: 10px;
}

.ms-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ms-messages.has-message-items::before {
  content: "";
  margin-top: auto;
}

.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: 1;
  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(-36px);
}
.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;
  background: #2d2d2d;
  color: #a6a6a6;
  font-size: 11px;
}

.ms-history-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(166, 166, 166, .32);
  border-top-color: #8fbfff;
  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: 16px;
  bottom: var(--ms-unread-jump-bottom, 82px);
  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 {
  align-self: center;
  max-width: 82%;
  color: #9d9d9d;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  overflow-wrap: anywhere;
}

.ms-message {
  display: grid;
  grid-template-columns: 30px minmax(0, auto);
  gap: 7px;
  max-width: min(70%, 720px);
  align-self: flex-start;
}

.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: 90px;
    background: var(--bg-bubble);
    border-radius: 10px 10px 10px 0;
    padding: 10px;
}

.ms-bubble::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -10px;
    width: 18px;
    height: 20px;
    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-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-menu {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  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: 5px;
  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);
}

.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-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-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;
}

.ms-call-message.is-accepted .ms-call-message-icon {
    background: rgba(40, 199, 111, .14);
    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: rgba(255, 99, 71, .13);
    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-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-message-link-card .ri-linkpreview__body.link-publish {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    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 {
    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] {
    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;
}

.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.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-loaded .ms-media-loading {
  opacity: 0;
  pointer-events: none;
}

.ms-media-frame.is-error .ms-media-loading {
  opacity: 1;
  color: #ff8a7a;
}

.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(#2378dc calc(var(--ms-load-progress, 0) * 1%), rgba(255, 255, 255, .13) 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 {
  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-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: .72;
}

.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: center;
    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: 13px;
  height: 13px;
  color: #2378dc;
}

.ms-message-status.is-read {
  width: 19px;
}

.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 .ms-bubble {
  animation: ms-message-highlight 2.5s ease;
}

@keyframes ms-message-highlight {
  0% { box-shadow: 0 0 0 0 rgba(35, 120, 220, .6); }
  35% { box-shadow: 0 0 0 4px rgba(35, 120, 220, .22); }
  100% { box-shadow: 0 0 0 0 rgba(35, 120, 220, 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-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: 28px;
  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(28px, 1fr));
  gap: 2px;
}

.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: 17px;
  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: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .55);
  padding: 14px;
}

.ms-modal {
  width: min(560px, 100%);
  max-height: min(760px, 95dvh);
  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 {
  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: 16px;
  letter-spacing: 0;
}

.ms-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-modal-actions {
  justify-content: flex-end;
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.ms-modal-action-left {
  margin-right: auto;
}

.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: #292929;
}

.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: #2b2b2b;
  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: #344054;
  border-color: rgba(0, 220, 255, .28);
  color: #fff;
}

.ms-forward-tab-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.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-group-row {
  background: #262626;
}

.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-empty,
.ms-loading {
  padding: 18px 10px;
  text-align: center;
  color: #a6a6a6;
  letter-spacing: 0;
}

.ms-call-start-btn[hidden] {
  display: none;
}

.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(85, 129, 255, .28);
  border-radius: var(--br);
  background: rgb(20 30 50);
  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 {
    box-shadow: none;
    cursor: default;
    user-select: auto;
    border: 0;
    border-bottom: 1px solid rgba(85, 129, 255, .28);
    border-radius: 0;
}

.ms-call-card.is-incoming {
  border-color: rgba(35, 120, 220, .42);
  background: #252a31;
}

.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: cover;
  display: block;
}

.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-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(85, 129, 255, .24);
  border-radius: var(--br);
  background: transparent;
  color: #eaf1fb;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}

.ms-call-btn:hover {
  background: transparent;
  border-color: rgba(0, 220, 255, .35);
}

.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: #4d1f1b;
  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);
}
.ms-call-btn.is-muted .ms-icon {
  color: #ffb4a8;
}

.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;
  }
}
