/* Notification popup: compact, readable and detached from the work-list flow. */
#workspace-notices {
  position: fixed;
  top: 78px;
  right: 28px;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(440px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 104px));
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid #e6dfd6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(28, 35, 30, .2), 0 4px 12px rgba(28, 35, 30, .08);
}

#workspace-notices[hidden] {
  display: none !important;
}

.workspace-notices-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #eee9e2;
  background: linear-gradient(135deg, #fffaf6 0%, #fff 70%);
}

.workspace-notices-header small {
  color: #b9684e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

.workspace-notices-header h2 {
  margin: 5px 0 3px;
  color: #29332d;
  font-size: 21px;
  line-height: 1.15;
}

.workspace-notices-header p {
  margin: 0;
  color: #8a918a;
  font-size: 12px;
}

.workspace-notices-read-all {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d9b5a6;
  border-radius: 9px;
  background: #fff8f4;
  color: #a95d46;
  font-size: 11px;
  font-weight: 800;
}

.workspace-notices-read-all:hover {
  border-color: #b9684e;
  background: #fdf0e9;
}

.workspace-notice-list {
  min-height: 0;
  overflow: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 11px 12px;
}

.workspace-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 12px;
  margin: 4px 0;
  padding: 13px 12px;
  border: 1px solid #eee8e0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.workspace-notice:hover {
  border-color: #d9b5a6;
  background: #fffaf7;
  transform: translateY(-1px);
}

.workspace-notice-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.workspace-notice-content b {
  color: #a95d46;
  font-size: 13px;
  line-height: 1.25;
}

.workspace-notice-content span {
  overflow-wrap: anywhere;
  color: #303a34;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.workspace-notice-assignee {
  color: #59675e !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
}

.workspace-notice-assignee strong {
  color: #2f7c60;
  font-weight: 800;
}

.workspace-notice-version {
  display: inline-flex;
  width: fit-content;
  margin-top: 1px;
  padding: 4px 7px;
  border-radius: 6px;
  background: #f8eee8;
  color: #a95d46 !important;
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1.3 !important;
}

.workspace-notice-version strong {
  margin-left: 4px;
  color: #873f2c;
  font-weight: 800;
}

.workspace-notice-content small {
  overflow-wrap: anywhere;
  color: #707a72;
  font-size: 11px;
  line-height: 1.45;
}

.workspace-notice-dismiss {
  align-self: start;
  width: 30px;
  height: 30px;
  border: 1px solid #ded8cf;
  border-radius: 8px;
  background: #faf9f6;
  color: #4d846b;
  font-size: 15px;
  font-weight: 800;
}

.workspace-notice-dismiss:hover {
  border-color: #a7c9b5;
  background: #eaf5ee;
}

.workspace-notices-empty {
  display: grid;
  gap: 5px;
  padding: 38px 20px 42px;
  color: #7f887f;
  text-align: center;
}

.workspace-notices-empty strong {
  color: #3e4b43;
  font-size: 14px;
}

.workspace-notices-empty span {
  font-size: 12px;
}

@media (max-width: 640px) {
  #workspace-notices {
    top: 70px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 88px);
    border-radius: 15px;
  }

  .workspace-notices-header {
    padding: 16px;
  }

  .workspace-notices-header h2 {
    font-size: 19px;
  }

  .workspace-notices-header p,
  .workspace-notices-read-all {
    font-size: 11px;
  }

  .workspace-notice {
    padding: 12px 10px;
  }
}
