/* Arena /notifications page.
 *
 * Served as a cached plugin asset rather than through Configs.theme_header,
 * which is re-rendered into the markup of every page - see
 * notify._install_page(). The --milima-* tokens come from THEME_HEADER in
 * arena/apply_arena.py, which defines them on :root for every page; the
 * fallbacks keep this readable if that header is ever cleared.
 */

.arena-notifs {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.75rem 1rem 3.5rem;
}

.arena-notifs__head h1 {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin: 0 0 1.1rem;
  color: var(--milima-ink, #E8F1F4);
}

.arena-notifs__empty {
  margin: 2.5rem 0;
  text-align: center;
  color: color-mix(in srgb, var(--milima-ink, #E8F1F4) 55%, transparent);
  font-size: .95rem;
}

.arena-notifs__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* One row. The left border is the unread accent; it is always present and
   transparent when read, so a row never changes width as it is read. */
.arena-notif {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .7rem .9rem;
  margin-bottom: .45rem;
  border: 1px solid var(--milima-line, #23425A);
  border-left: 3px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--milima-navy2, #12293B) 70%, transparent);
  transition: background .15s ease, border-color .15s ease;
}

.arena-notif:hover {
  background: color-mix(in srgb, var(--milima-navy2, #12293B) 92%, transparent);
}

.arena-notif--unread {
  border-left-color: var(--milima-teal, #1FB6C9);
  background: color-mix(in srgb, var(--milima-teal, #1FB6C9) 9%, var(--milima-navy2, #12293B));
}

.arena-notif--read {
  opacity: .66;
}

/* Admin broadcasts read as announcements, not as one more automatic notice:
   mint accent, a tag, and no dimming of the icon. */
.arena-notif--announcement {
  border-left-color: var(--milima-mint, #3FB68B);
}

.arena-notif--announcement.arena-notif--unread {
  background: color-mix(in srgb, var(--milima-mint, #3FB68B) 10%, var(--milima-navy2, #12293B));
}

.arena-notif__icon {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: .8rem;
  background: color-mix(in srgb, var(--milima-teal, #1FB6C9) 14%, transparent);
  color: var(--milima-teal, #1FB6C9);
}

.arena-notif--award .arena-notif__icon {
  background: color-mix(in srgb, #F5A623 16%, transparent);
  color: #F5A623;
}

.arena-notif--announcement .arena-notif__icon {
  background: color-mix(in srgb, var(--milima-mint, #3FB68B) 16%, transparent);
  color: var(--milima-mint, #3FB68B);
}

.arena-notif__main {
  min-width: 0;        /* lets the one-line body actually ellipsize */
  flex: 1 1 auto;
}

.arena-notif__titlerow {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.arena-notif__title {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.35;
  color: var(--milima-ink, #E8F1F4);
}

.arena-notif__tag {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .1rem .4rem;
  border-radius: 4px;
  color: var(--milima-mint, #3FB68B);
  background: color-mix(in srgb, var(--milima-mint, #3FB68B) 16%, transparent);
}

.arena-notif__dot {
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--milima-teal, #1FB6C9);
}

.arena-notif__body {
  margin: .15rem 0 0;
  font-size: .85rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--milima-ink, #E8F1F4) 68%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arena-notif__time {
  flex: 0 0 auto;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: .15rem;
  color: color-mix(in srgb, var(--milima-ink, #E8F1F4) 50%, transparent);
  cursor: help;        /* the full timestamp is on the title attribute */
}

@media (max-width: 560px) {
  .arena-notifs { padding: 1.25rem .75rem 2.5rem; }
  .arena-notif { gap: .6rem; padding: .6rem .7rem; }
  .arena-notif__icon { width: 1.6rem; height: 1.6rem; font-size: .7rem; }
  /* The timestamp drops under the text rather than squeezing the title. */
  .arena-notif { flex-wrap: wrap; }
  .arena-notif__time { order: 3; width: 100%; padding-left: 2.2rem; padding-top: .2rem; }
}

/* The box brief (team_flags.delivery) is the one notice whose body is not a
   one-line summary: it carries the team's target addresses, so it has to wrap
   and keep its line breaks instead of being clipped to an ellipsis. Monospace
   because every line after the first is a host and a port. */
.arena-notif--box .arena-notif__body {
  white-space: pre-line;
  overflow: visible;
  text-overflow: clip;
  font-family: Menlo, Consolas, ui-monospace, monospace;
  font-size: .8rem;
  color: color-mix(in srgb, var(--milima-ink, #E8F1F4) 82%, transparent);
}
