/* Scoped so the customer canvas and workbench share the same compact announcement. */
.announcement-entry {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  border: 0;
  background: transparent;
  color: #61708a;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  margin: 0 0 8px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.announcement-entry:hover {
  background: #eef1f9;
  color: #365ace;
}
.announcement-entry[hidden] {
  display: none !important;
}
dialog.site-news-dialog {
  box-sizing: border-box;
  width: min(600px, calc(100vw - 28px));
  max-width: 600px;
  max-height: min(660px, 78dvh);
  padding: 0;
  border: 1px solid #dce1ed;
  border-radius: 16px;
  background: #fff;
  color: #283247;
  box-shadow: 0 20px 70px #0003;
  overflow: hidden;
  font:
    14px -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    sans-serif;
}
dialog.site-news-dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog.site-news-dialog::backdrop {
  background: #16203670;
}
.site-news-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #edf0f5;
  flex-shrink: 0;
  height: auto;
  min-height: 0;
}
.site-news-dialog h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  color: #283247;
}
.site-news-dialog > header button {
  font: 24px/1 sans-serif;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #47516a;
  border-radius: 6px;
  cursor: pointer;
}
.site-news-dialog > header button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.site-news-dialog button:focus-visible,
.site-news-scroll:focus-visible {
  outline: 2px solid #6282ee;
  outline-offset: -3px;
}
.site-news-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 0 20px;
  scrollbar-gutter: stable;
}
.site-news-item {
  padding: 18px 0;
  border-bottom: 1px solid #edf0f5;
  overflow-wrap: anywhere;
}
.site-news-item:last-child {
  border: 0;
}
.site-news-item h3 {
  font-size: 17px;
  line-height: 1.6;
  margin: 8px 0 12px;
  color: #283247;
}
.site-news-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: #8992a4;
}
.site-news-meta b {
  padding: 3px 7px;
  border-radius: 5px;
  background: #eef2ff;
  color: #4d65ba;
  font-weight: 500;
}
.site-news-meta time {
  margin-left: auto;
}
.site-news-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
  font-size: 14px;
  color: #465166;
}
.site-news-item img,
.news-admin-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 14px auto 0;
  border-radius: 8px;
}
.site-news-item > summary {
  cursor: pointer;
  font-size: 14px;
  line-height: 1.6;
  color: #53617d;
}
.site-news-item[open] > summary {
  margin-bottom: 14px;
}
.site-news-dialog > footer {
  flex-shrink: 0;
  display: block;
  height: auto;
  padding: 12px 20px;
  background: #f8f9fc;
  border-top: 1px solid #edf0f5;
  font-size: 12px;
  line-height: 1.6;
  color: #758096;
}
.site-news-dialog > footer span {
  display: inline !important;
}
.news-admin-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.news-admin-heading h2 {
  margin: 0;
}
.news-admin-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid #e9edf4;
}
.news-admin-row > div:first-child {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.news-admin-row small {
  display: block;
  margin-top: 6px;
}
.news-admin-row > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
dialog.news-admin-dialog {
  box-sizing: border-box;
  width: min(700px, 94vw);
  max-height: 88dvh;
  overflow: auto;
  border: 1px solid #d9dfeb;
  border-radius: 16px;
  padding: 24px;
  color: #424e61;
  background: #fff;
}
dialog.news-admin-dialog::backdrop {
  background: #16203670;
}
.news-admin-dialog textarea {
  resize: vertical;
}
.news-admin-dialog label > input[type='checkbox'] {
  width: auto;
  margin: 0 8px;
}
.news-admin-preview {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #e0e6f1;
  border-radius: 8px;
}
.news-admin-preview > div {
  max-height: 300px;
  overflow: auto;
}
.news-admin-preview summary {
  cursor: pointer;
}
.news-admin-dialog [role='status'] {
  font-size: 13px;
  line-height: 1.6;
}
@media (max-width: 600px) {
  dialog.site-news-dialog {
    max-height: 74dvh;
  }
  .site-news-dialog > header {
    padding: 14px 16px;
  }
  .site-news-scroll {
    padding: 0 16px;
  }
  .site-news-dialog > footer {
    padding: 10px 16px;
  }
  .news-admin-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  dialog.news-admin-dialog {
    padding: 18px;
  }
}
