/* Sign-in backdrop: a fake system-activity console to the left of the sphere.
 *
 * Purely decorative, same rules as the sphere itself (login-orb.css) - aria-
 * hidden and pointer-events:none, so it is invisible to assistive technology
 * and can never intercept a click meant for the form. Driven by
 * js/login-activity-feed.js from static/json/background_activity_messages.json;
 * if that fetch fails the panel just stays empty and the form still works.
 *
 * The "scroll up" effect needs no animation: .activity-feed-list is a flex
 * column bottom-aligned with overflow hidden, so newly appended lines push
 * the bottom edge and older lines are clipped off the top for free.
 *
 * Hidden below 1000px - there isn't room for a side panel once the card has
 * to sit centred instead of tucked into the corner (see login-orb.css).
 *
 * The type is VT323 (Peter Hull, SIL OFL 1.1), self-hosted in
 * app/static/fonts/ - see that folder's README. It gives the panel the
 * blocky MU-TH-UR 6000 readout look from Alien. Declared here rather than in
 * a global stylesheet because this is the only screen that uses it. If the
 * face fails to load the monospace fallback stack still reads fine.
 */
@font-face {
  font-family: "VT323";
  src: url("../../fonts/vt323-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.activity-feed {
  display: none;
}

@media (min-width: 1000px) {
  .activity-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    position: fixed;
    z-index: 1;
    top: var(--space-5);
    bottom: var(--space-5);
    left: clamp(var(--space-5), 4vw, var(--space-6));
    width: clamp(300px, 24vw, 400px);
    padding: var(--space-4);
    pointer-events: none;
    background: color-mix(in srgb, var(--orb-backdrop) 55%, transparent);
    border: 1px solid color-mix(in srgb, var(--orb-bright) 20%, transparent);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

.activity-feed-label {
  flex: 0 0 auto;
  margin: 0;
  font: 400 1.05rem "VT323", ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--orb-bright) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--orb-bright) 18%, transparent);
  padding-bottom: var(--space-2);
}

.activity-feed-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, black 18%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 18%);
}

.activity-feed-line {
  flex: 0 0 auto;
  margin: 0;
  padding: 1px 0;
  font: 1rem / 1.35 "VT323", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: color-mix(in srgb, var(--orb-bright) 55%, transparent);
  text-shadow: 0 0 6px color-mix(in srgb, var(--orb-bright) 30%, transparent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 1.4s ease, text-shadow 1.4s ease;
}

.activity-feed-line.is-in {
  opacity: 1;
  transform: translateY(0);
}

.activity-feed-line.is-latest {
  color: var(--orb-soft);
  text-shadow: 0 0 10px color-mix(in srgb, var(--orb-soft) 55%, transparent);
}

/* Custom sequences (the running-gag Easter eggs) always read as plain white,
   never the dimmed/themed orb colour, and never fade back down the way an
   ordinary line does once it stops being "latest" - so this deliberately
   comes after .is-latest and skips the colour/text-shadow transition. This
   is the one place a colour is intentionally NOT a theme token: the point is
   for it to look the same in all eight themes, not vary with them. `white`
   is a plain CSS keyword, not a literal the theme-discipline test polices. */
.activity-feed-line.is-custom {
  color: white;
  text-shadow: 0 0 8px color-mix(in srgb, white 45%, transparent);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
