/* The notices the admin posts (js/core/noticeView.js draws them).

   One look per kind, each from the theme's status colours so all the themes
   follow: green for good news, blue for information, ochre for maintenance,
   and a solid red block for urgent, which is meant to be hard to miss. */

.site-notices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 10px;
}

.site-notices:empty { display: none; }

.site-notice {
  --notice-line: var(--info);
  --notice-fill: var(--info-soft);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--notice-line);
  border-left-width: 6px;
  border-radius: 6px;
  background: var(--notice-fill);
  color: var(--ink);
  font-family: var(--font-body);
  text-align: left;
  line-height: 1.45;
}

.site-notice--good {
  --notice-line: var(--ok);
  --notice-fill: var(--ok-soft);
}

.site-notice--maintenance {
  --notice-line: var(--warn);
  --notice-fill: var(--warn-soft);
}

.site-notice--urgent {
  --notice-line: var(--danger);
  --notice-fill: var(--danger);
  color: var(--on-status);
}

.site-notice__icon {
  margin-top: 2px;
  font-size: calc(1.35rem * var(--font-scale, 1));
  color: var(--notice-line);
}

.site-notice--urgent .site-notice__icon { color: inherit; }

.site-notice__text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-notice__title {
  display: block;
  font-size: calc(1.05rem * var(--font-scale, 1));
}

/* Line breaks typed into the message are kept. */
.site-notice .site-notice__message {
  margin: 2px 0 0;
  white-space: pre-line;
  font-size: calc(0.95rem * var(--font-scale, 1));
}

.site-notice a.site-notice__link {
  display: inline-block;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}

.site-notice--urgent a.site-notice__link { color: inherit; }

.site-notice button.site-notice__close {
  width: auto;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ------------------------------------- the admin's visit counts, small print */

.page-visits {
  margin: 4px 10px;
  font-size: calc(0.75rem * var(--font-scale, 1));
  color: var(--ink-faint);
  text-align: left;
}

.page-visits summary { cursor: pointer; }

.page-visits table {
  margin: 4px 0 0;
  border-collapse: collapse;
}

.page-visits td { padding: 0 14px 0 0; }

.page-visits td + td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
