.top-message-dropdown {
  position: absolute !important;
  top: calc(100% + 8px);
  right: -10px;
  left: auto;
  width: 274px;
  height: 372px;
  max-width: min(274px, calc(100vw - 24px));
  max-height: 372px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e8e0da;
  border-radius: 2px !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16) !important;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Nunito Sans", Helvetica, sans-serif;
  animation: ntfIn 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 480px) {
  .top-message-dropdown {
    position: fixed !important;
    top: var(--nb-header-offset, var(--mim-header-offset, 130px));
    left: 12px;
    right: 12px;
    width: auto;
    height: auto;
    max-width: none;
    max-height: calc(
      100dvh - var(--nb-header-offset, var(--mim-header-offset, 130px)) - 16px
    );
  }

  .top-message-body {
    max-height: calc(
      100dvh - var(--nb-header-offset, var(--mim-header-offset, 130px)) - 52px
    );
  }
}

.top-message-dropdown-header {
  height: 28px;
  background: #e85d1f;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
}

.top-message-dropdown-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.top-message-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

.top-message-body::-webkit-scrollbar {
  width: 3px;
}

.top-message-body::-webkit-scrollbar-thumb {
  background: #f6b588;
  border-radius: 4px;
}

.top-message-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.top-message-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid #f2e4dc;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.13s ease;
}

.top-message-item:hover,
.top-message-item:focus {
  background: #fff5ef;
  /* Override global `a:hover { color: #fff }` from style.css */
  color: inherit;
}

.top-message-item:hover .top-message-copy strong,
.top-message-item:focus .top-message-copy strong {
  color: #3e5569;
}

.top-message-item:hover .top-message-desc,
.top-message-item:focus .top-message-desc {
  color: #3e5569;
}

.top-message-item:hover .top-message-desc.is-deleted,
.top-message-item:focus .top-message-desc.is-deleted {
  color: #8a96a8;
}

.top-message-item:hover .top-message-top-row em,
.top-message-item:focus .top-message-top-row em {
  color: #8a96a8;
}

.top-message-item:hover .top-message-badge,
.top-message-item:focus .top-message-badge {
  color: #fff;
}

.top-message-avatar-wrap {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #dedede;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.top-message-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.top-message-avatar.top-message-avatar--company[data-fallback="true"] {
  object-fit: contain;
  padding: 4px;
}

.top-message-avatar.top-message-avatar--company[data-fallback="letter"] {
  object-fit: cover;
  padding: 0;
}

.top-message-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 1px;
}

.top-message-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.top-message-copy strong {
  font-size: 12px;
  font-weight: 600;
  color: #3e5569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Open Sans", "Nunito Sans", Helvetica, sans-serif;
}

.top-message-top-row em {
  font-size: 9px;
  font-style: normal;
  color: #8a96a8;
  white-space: nowrap;
  flex: 0 0 auto;
}

.top-message-desc {
  font-size: 10px;
  font-weight: 400;
  color: #3e5569;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: "Open Sans", "Nunito Sans", Helvetica, sans-serif;
}

.top-message-desc.is-deleted {
  font-style: italic;
  color: #8a96a8;
}

.top-message-badge,
.top-message-type {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 1px;
}

.top-message-badge {
  min-width: 22px;
  padding: 0;
  background: #e85d1f;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.top-message-type {
  background: #e8f7ee;
  color: #2f9e5b;
}

.top-message-type svg {
  width: 12px;
  height: 12px;
  display: block;
}

.top-message-empty {
  padding: 26px 16px;
  text-align: center;
}

.top-message-empty-icon {
  display: block;
  margin: 0 auto 8px;
  width: 28px !important;
  height: 28px !important;
  max-width: 28px;
  max-height: 28px;
  color: #e85d1f;
  overflow: hidden;
}

.top-message-empty-text {
  font-size: 11px;
  color: #8a96a8;
  margin: 0;
}

.top-message-view-all {
  height: 28px;
  background: #e85d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  cursor: pointer;
  border: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  transition: background 0.13s ease;
}

.top-message-view-all img {
  width: 14px;
  height: 14px;
  display: block;
  flex: 0 0 auto;
}

.top-message-view-all:hover,
.top-message-view-all:focus {
  background: #d45318;
  color: #fff;
}

.msg-toast-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
}

.msg-toast {
  width: 320px;
  max-width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d2d6de;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  text-decoration: none;
  color: #1e293b;
  box-sizing: border-box;
}

.msg-toast:hover,
.msg-toast:focus,
.msg-toast:focus-visible {
  background: #fff7ed;
  /* Override global `a:hover { color: #fff }` from style.css */
  color: #1e293b;
  text-decoration: none;
}

.msg-toast-avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #dedede;
  background: #ffffff;
  flex: 0 0 auto;
}

.msg-toast-avatar.msg-toast-avatar--company[data-fallback="true"] {
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
}

.msg-toast-avatar.msg-toast-avatar--company[data-fallback="letter"] {
  object-fit: cover;
  padding: 0;
}

.msg-toast-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-toast-copy strong {
  font-size: 12px;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-toast-copy span,
.msg-toast-copy small {
  font-size: 10px;
  color: #64748b;
}

.msg-toast:hover .msg-toast-copy strong,
.msg-toast:focus .msg-toast-copy strong,
.msg-toast:focus-visible .msg-toast-copy strong {
  color: #1e293b;
}

.msg-toast:hover .msg-toast-copy span,
.msg-toast:hover .msg-toast-copy small,
.msg-toast:focus .msg-toast-copy span,
.msg-toast:focus .msg-toast-copy small,
.msg-toast:focus-visible .msg-toast-copy span,
.msg-toast:focus-visible .msg-toast-copy small {
  color: #64748b;
}

.msg-toast-copy span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.msg-toast-close {
  border: 0;
  background: #fff;
  color: #334155;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.msg-toast-close:hover,
.msg-toast-close:focus {
  color: #1e293b;
  background: #fff;
}

@media (max-width: 767px) {
  .msg-toast-wrap {
    left: 12px;
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    z-index: 100070;
    align-items: stretch;
  }

  .msg-toast {
    width: auto;
    flex: 1 1 auto;
    min-height: 56px;
  }

  .msg-toast-close {
    align-self: center;
  }
}

.nb-msg-wrap {
  position: relative;
  flex-shrink: 0;
  overflow: visible;
  z-index: 50;
}
