/* Announcements: the list, the types, the editor and its preview. Tokens only, so light and dark both
   follow tokens.css. The few colours set from the page's script are a type's own colour, on the dot,
   the pill and the bar preview's edge, through the CSSOM rather than a style attribute. */

/* ------------------------------------------------------------------ the list */

/* A cell with a second, quieter line under it: a title and its short text, a time and who. */
.ann-two { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ann-two > strong { font-weight: 600; }
.ann-sub { font-size: 12.5px; color: var(--ink-3); white-space: normal; }
.ann-warn { color: var(--warn); font-weight: 500; }
.ann-type { display: inline-flex; align-items: center; gap: 7px; }
.ann-type .icon { width: 15px; height: 15px; color: var(--ink-2); }
.ann-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }

/* A type as the customer site draws it: the pill on the site's own dark background, whichever theme
   the panel is in, because that background is what decides whether the colour reads. */
.ann-site { display: inline-flex; padding: 6px 8px; background: #11141a; border-radius: 9px; }
.ann-site-pill,
.ann-bar-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: #6ea8ff;
  background: rgba(110, 168, 255, .14);
  border-radius: 999px;
}
.ann-site-pill .icon, .ann-bar-pill .icon { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ the editor */

.ann-back { margin: -4px 0 0; }
.ann-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.ann-main, .ann-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1100px) {
  .ann-layout { grid-template-columns: minmax(0, 1fr); }
}

.ann-form { display: flex; flex-direction: column; gap: 16px; padding: 16px 18px 18px; }
.ann-form .ask-input { width: 100%; }
.ann-summary { min-height: 64px; }
.ann-over { color: var(--crit); }

/* The types, as chips to pick from. */
.ann-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ann-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
}
.ann-chip:hover:not(:disabled) { background: var(--panel-2); }
.ann-chip.on { font-weight: 600; background: var(--panel-2); border-width: 2px; padding: 0 11px; }
.ann-chip:disabled { cursor: default; opacity: .7; }
.ann-chips > .btn { min-height: 32px; border-style: dashed; border-radius: 999px; }

/* The article: a toolbar over the box, and the preview in the box's place. */
.ann-editor { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.ann-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ann-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.ann-tool { min-width: 34px; justify-content: center; }
.ann-tools-gap { flex: 1; }
.ann-editor .ann-article {
  min-height: 320px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
.ann-editor .ann-article:focus { box-shadow: none; }
.ann-editor .ann-article[hidden], .ann-preview[hidden], .ann-file[hidden] { display: none; }
.ann-preview { min-height: 320px; padding: 14px 18px; overflow-wrap: anywhere; }

/* An article as it reads: the same Markdown the site draws, in the panel's own type. */
.art { font-size: 14px; line-height: 1.65; color: var(--ink); }
.art > :first-child { margin-top: 0; }
.art > :last-child { margin-bottom: 0; }
.art p { margin: 0 0 12px; }
.art h2 { margin: 20px 0 8px; font-size: 17px; font-weight: 600; }
.art h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; }
.art ul, .art ol { margin: 0 0 12px; padding-left: 22px; }
.art li { margin: 2px 0; }
.art a { color: var(--accent); }
.art hr { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.art-box { margin: 0 0 12px; padding: 12px 14px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); }
.art-box > :last-child { margin-bottom: 0; }
.art-figure { margin: 4px 0 14px; }
.art-picture { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }

/* Updates, oldest first, as the article lists them. */
.ann-updates { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ann-update { display: flex; align-items: flex-start; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--line); }
.ann-update-at { flex: none; min-width: 150px; color: var(--ink-2); }
.ann-update-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ann-update-act { flex: none; }
.ann-update-act .btn { min-height: 28px; padding: 0 10px; font-size: 12.5px; }

/* Publishing. */
.ann-fact { margin: 0; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); background: var(--panel-2); border-radius: var(--radius); }
.ann-fact strong { color: var(--ink); font-weight: 600; }
.ann-time { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ann-time[hidden] { display: none; }
.ann-time .ann-when { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }
.ann-utc { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ann-actions { justify-content: space-between; }
.card > .ann-actions { margin-top: 0; }

/* The bar as customers will see it: the site's own dark colours, in either theme. */
.ann-bar-frame { margin: 12px 14px 0; overflow: hidden; background: #11141a; border: 1px solid #222838; border-radius: 12px; }
.ann-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px 10px 12px;
  background: linear-gradient(90deg, #1a1f2b, #0b0e12 70%);
  border-left: 3px solid #6ea8ff;
}
.ann-bar.off { opacity: .45; }
.ann-bar-words { display: flex; flex: 1; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
/* The title keeps its room and the short text gives way first, as on the site. */
.ann-bar-title { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; font-weight: 600; color: #eceef4; }
.ann-bar-text { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #9aa3b8; }
.ann-bar-text[hidden] { display: none; }
.ann-bar-more { display: inline-flex; flex: none; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #a9b8ff; }
.ann-bar-more .icon { width: 13px; height: 13px; }
.ann-bar-page { height: 56px; padding: 12px 14px; font-size: 11px; color: #7d869c; }
.ann-preview-note { margin: 0; padding: 10px 14px 14px; font-size: 12.5px; color: var(--ink-3); }

.ann-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
