.gscript-notify-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 8px;
  text-decoration: none;
  vertical-align: middle;
}

.gscript-notify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font: bold 14px/1 Arial, sans-serif;
  color: #fff;
  background: #3b5266;
}

.gscript-notify-badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 8px;
  background: #d62436;
  color: #fff;
  font: bold 11px/16px Arial, sans-serif;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.gscript-notify-link[data-number-unread="0"] .gscript-notify-badge {
  display: none;
}

.gscript-notify-toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 100002;
  width: min(320px, calc(100vw - 32px));
}

.gscript-notify-toast {
  margin-top: 8px;
  border-radius: 6px;
  background: rgba(28, 36, 43, .94);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .24);
  overflow: hidden;
}

.gscript-notify-toast-inner {
  padding: 10px 12px;
}

.gscript-notify-toast a {
  color: inherit;
}

.gscript-notify-toast strong,
.gscript-notify-toast span {
  display: block;
}

.gscript-notify-toast strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.gscript-notify-toast span {
  font-size: 12px;
  line-height: 1.35;
}

.gscript-notify-modal[hidden] {
  display: none;
}

.gscript-notify-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 12px 24px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .38);
}

.gscript-notify-dialog {
  width: min(620px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: #fff;
  color: #1f252b;
  box-shadow: 0 12px 42px rgba(0, 0, 0, .35);
  overflow: hidden;
}

.gscript-notify-head,
.gscript-notify-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #eef2f5;
}

.gscript-notify-head strong {
  font-size: 15px;
}

.gscript-notify-close,
.gscript-notify-actions button,
.gscript-notify-row-actions button {
  border: 1px solid rgba(0, 0, 0, .18);
  border-radius: 5px;
  background: #fff;
  color: #26323a;
  font: 12px/1.2 Arial, sans-serif;
  cursor: pointer;
}

.gscript-notify-close,
.gscript-notify-actions button {
  padding: 6px 10px;
}

.gscript-notify-list {
  overflow: auto;
  max-height: calc(78vh - 88px);
}

.gscript-notify-empty {
  padding: 22px 14px;
  text-align: center;
  color: #66727c;
}

.gscript-notify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.gscript-notify-row:first-child {
  border-top: 0;
}

.gscript-notify-row.is-unread {
  background: #f7fbff;
}

.gscript-notify-main {
  min-width: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.gscript-notify-title,
.gscript-notify-html,
.gscript-notify-time {
  display: block;
}

.gscript-notify-title {
  margin-bottom: 3px;
  font-weight: 700;
  font-size: 13px;
}

.gscript-notify-html {
  font-size: 12px;
  line-height: 1.4;
}

.gscript-notify-html a {
  color: #2d6594;
}

.gscript-notify-time {
  margin-top: 5px;
  color: #73808a;
  font-size: 11px;
}

.gscript-notify-row-actions {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.gscript-notify-row-actions button {
  min-width: 24px;
  min-height: 24px;
  padding: 4px 7px;
}

.msg-preview {
  color: inherit;
  opacity: .78;
}

.gscript-mention-suggest {
  position: fixed;
  z-index: 100003;
  min-width: 190px;
  max-width: min(320px, calc(100vw - 16px));
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: 6px;
  background: #fff;
  color: #1f252b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

.gscript-mention-suggest[hidden] {
  display: none;
}

.gscript-mention-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: 13px/1.25 Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.gscript-mention-item.is-active,
.gscript-mention-item:hover {
  background: #eaf2f8;
}

.gscript-mention-avatar {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #d8e0e7 center / cover no-repeat;
}

.gscript-mention-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .gscript-notify-modal {
    padding-top: 5vh;
  }

  .gscript-notify-dialog {
    max-height: 88vh;
  }

  .gscript-notify-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .gscript-notify-row-actions {
    justify-content: flex-end;
  }
}
