/* Utopia Love Live — stream page. Scoped to .ull so the theme's article styles stay untouched. */

.ull {
  --ull-ink: #171717;
  --ull-muted: #5f5f5f;
  --ull-line: #e4e1da;
  --ull-soft: #f6f3ee;
  --ull-surface: #ffffff;
  --ull-love: #e0245e;
  --ull-love-soft: rgba(224, 36, 94, .09);
  --ull-live-bg: #d81b56;   /* white text on this is 5:1 */
  --ull-count: #c2185b;     /* on the white count badge */
  color: var(--ull-ink);
  margin: 0 0 2rem;
}

html[data-sau-theme="dark"] .ull {
  --ull-ink: var(--sau-ink, #f2f2f2);
  --ull-muted: var(--sau-muted, #a9a9a9);
  --ull-line: var(--sau-border, #333333);
  --ull-soft: var(--sau-surface-soft, #1d1d1d);
  --ull-surface: var(--sau-surface, #121212);
  --ull-love: #ff5c8a;
  --ull-love-soft: rgba(255, 92, 138, .14);
}

.ull a::after { content: none !important; }

/* Live bar */
.ull .ull-bar {
  position: relative;
  overflow: hidden;         /* the bar's emoji fountain stays inside it */
  display: flex;
  flex-wrap: wrap;          /* only wraps at very large text sizes */
  align-items: center;
  gap: .6rem .8rem;
  margin: 0 0 .85rem;
  padding: .7rem .85rem;
  border: 1px solid var(--ull-line);
  border-radius: 14px;
  background: var(--ull-soft);
  font-size: .92rem;
  line-height: 1.3;
}

.ull .ull-live {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .28rem .6rem;
  border-radius: 999px;
  background: var(--ull-live-bg);
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ull .ull-live__dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #fff;
  animation: ull-blink 1.6s ease-in-out infinite;
}

.ull.is-paused .ull-live { background: var(--ull-muted); }
.ull.is-paused .ull-live__dot { animation: none; opacity: .7; }

.ull .ull-stats {
  display: flex;
  flex: 1 1 8rem;
  flex-wrap: wrap;
  gap: .1rem .8rem;
  min-width: 0;
}
.ull .ull-stat { color: var(--ull-muted); white-space: nowrap; }
.ull .ull-stat strong { display: inline-block; color: var(--ull-ink); font-weight: 850; font-variant-numeric: tabular-nums; }

.ull .ull-toggle {
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 36px;
  padding: .3rem .85rem;
  border: 1px solid var(--ull-line);
  border-radius: 999px;
  background: var(--ull-surface);
  color: var(--ull-ink);
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}
.ull .ull-toggle:hover { border-color: var(--ull-muted); }
.ull .ull-toggle:disabled { opacity: .5; cursor: default; }
.ull .ull-toggle:focus-visible { outline: 3px solid #2458e8; outline-offset: 2px; }
.ull .ull-toggle[hidden] { display: none; }

.ull .ull-lede { margin: 0 0 1.4rem; color: var(--ull-muted); font-size: .95rem; }

.ull .ull-heading {
  margin: 0 0 .7rem;
  color: var(--ull-ink);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .07em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Most loved right now */
.ull .ull-hot { margin: 0 0 1.8rem; }
.ull .ull-hot[hidden] { display: none; }

.ull .ull-hot__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .ull .ull-hot__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.ull .ull-hot__item { margin: 0; padding: 0; }
.ull .ull-hot__item::marker { content: none; }

.ull a.ull-hot__link,
.ull a.ull-hot__link:visited,
.ull a.ull-hot__link:hover,
.ull a.ull-hot__link:focus-visible {
  position: relative;
  display: block;
  color: var(--ull-ink) !important;
  font-weight: 700;
  text-decoration: none !important;
  background: none !important;
  border-radius: 12px;
}
.ull a.ull-hot__link:focus-visible { outline: 3px solid #2458e8; outline-offset: 2px; }

.ull .ull-hot__img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0;
  object-fit: cover;
  border-radius: 12px;
  background: var(--ull-soft);
}

.ull .ull-hot__count {
  position: absolute;
  top: .45rem;
  left: .45rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  color: var(--ull-count);
  font-size: .8rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.ull .ull-hot__title {
  display: -webkit-box;
  margin-top: .4rem;
  overflow: hidden;
  font-size: .84rem;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Stream */
.ull .ull-stream {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ull-line);
}

.ull .ull-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ull-line);
}
.ull .ull-stream.is-stacked { position: relative; }
.ull .ull-stream.is-stacked > .ull-item {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
}
.ull .ull-stream.is-animated > .ull-item { transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.ull .ull-item::marker { content: none; }

.ull a.ull-item__link,
.ull a.ull-item__link:visited,
.ull a.ull-item__link:hover,
.ull a.ull-item__link:focus-visible {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  box-sizing: border-box;
  /* Fixed per row (so the list height never jumps), but grows with text size. */
  height: max(94px, 5.45rem);
  padding: .65rem .35rem;
  overflow: hidden;
  color: var(--ull-ink) !important;
  font-weight: 400;
  text-decoration: none !important;
  border-radius: 10px;
  background: none !important;
}
.ull a.ull-item__link:hover { background: var(--ull-soft) !important; }
.ull a.ull-item__link:focus-visible { outline: 3px solid #2458e8; outline-offset: -3px; }

.ull .ull-item__img {
  display: block;
  width: 72px;
  max-width: 72px;
  height: 72px;
  margin: 0;
  object-fit: cover;
  border-radius: 10px;
  background: var(--ull-soft);
}

.ull .ull-item__body { display: block; min-width: 0; }

.ull .ull-item__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: .98rem;
  font-weight: 750;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ull .ull-item__meta {
  display: block;
  margin-top: .25rem;
  overflow: hidden;
  color: var(--ull-muted);
  font-size: .82rem;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ull .ull-item__emoji { display: inline-block; font-size: 1rem; letter-spacing: .05em; }
.ull .ull-item__verb { color: var(--ull-ink); font-weight: 700; }

.ull .ull-empty { margin: 1rem 0 0; color: var(--ull-muted); }
.ull .ull-empty[hidden] { display: none; }

.ull .ull-note { margin: 1.2rem 0 0; color: var(--ull-muted); font-size: .8rem; }

.ull .ull-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* "N new Loves" pill on a zero-height sticky rail: showing it never moves the page. */
.ull .ull-newrail {
  position: sticky;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + .75rem);
  z-index: 3;
  display: flex;
  justify-content: center;
  height: 0;
  overflow: visible;
}
.ull .ull-newpill {
  min-height: 40px;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ull-live-bg);
  color: #fff;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
  cursor: pointer;
}
.ull .ull-newpill[hidden] { display: none; }
.ull .ull-newpill:focus-visible { outline: 3px solid #2458e8; outline-offset: 2px; }

/* Party layers: absolutely positioned, clipped, never clickable. */
.ull .ull-stream-wrap { position: relative; }
.ull .ull-rows { position: relative; } /* the emoji stage covers the rows only */
.ull .ull-chip,
.ull a.ull-item__link { position: relative; } /* keeps .ull-sr text inside its own box */
.ull .ull-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.ull .ull-stage--bar { z-index: 0; }
.ull .ull-bar > :not(.ull-stage) { position: relative; z-index: 1; }

.ull .ull-float {
  position: absolute;
  right: calc(10px + var(--ull-x, 0px));
  font-size: 1.7rem;
  line-height: 1;
  opacity: 0;
  animation: ull-float var(--ull-dur, 2.8s) cubic-bezier(.2, .7, .3, 1) forwards;
  will-change: transform, opacity;
}
.ull .ull-float--bar {
  top: auto;
  bottom: -1.4rem;
  font-size: 1.25rem;
  animation-name: ull-float-bar;
}
@keyframes ull-float {
  0% { opacity: 0; transform: translate(0, 0) scale(.5); }
  12% { opacity: 1; transform: translate(0, -24px) scale(1.15); }
  70% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--ull-dx, 0px), -260px) scale(.95); }
}
@keyframes ull-float-bar {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--ull-dx, 0px), -4.4rem) scale(1); }
}

/* Emoji tally = filter chips. One row that scrolls sideways inside itself. */
.ull .ull-mixwrap { margin: 0 0 .8rem; }
.ull .ull-mixwrap[hidden] { display: none; }
.ull .ull-mix__label {
  display: block;
  margin: 0 0 .4rem;
  color: var(--ull-muted);
  font-size: .78rem;
}
.ull .ull-mix {
  display: flex;
  gap: .4rem;
  margin: 0 -.2rem;
  padding: .15rem .2rem .35rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.ull .ull-mix::-webkit-scrollbar { display: none; }
.ull .ull-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .1rem;
  min-height: 40px;
  padding: .3rem .75rem;
  border: 1px solid var(--ull-line);
  border-radius: 999px;
  background: var(--ull-surface);
  color: var(--ull-ink);
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}
.ull .ull-chip__emoji { font-size: 1.05rem; }
.ull .ull-chip:hover { border-color: var(--ull-muted); }
.ull .ull-chip[aria-pressed="true"] {
  border-color: var(--ull-ink);
  background: var(--ull-ink);
  color: var(--ull-surface);
}
.ull .ull-chip:focus-visible { outline: 3px solid #2458e8; outline-offset: 2px; }

/* Motion */
.ull .ull-item--new { animation: ull-arrive 2.6s ease-out; }
.ull .ull-item--new .ull-item__emoji { animation: ull-pop .6s cubic-bezier(.2, 1.6, .4, 1); }
.ull .ull-bump { animation: ull-pop .5s cubic-bezier(.2, 1.6, .4, 1); }

@keyframes ull-arrive {
  0% { opacity: 0; background: var(--ull-love-soft); }
  15% { opacity: 1; background: var(--ull-love-soft); }
  100% { background: transparent; }
}
@keyframes ull-pop {
  0% { transform: scale(.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes ull-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  .ull .ull-float { display: none; }
  .ull .ull-live__dot,
  .ull .ull-item--new,
  .ull .ull-item--new .ull-item__emoji,
  .ull .ull-stream.is-animated > .ull-item,
  .ull .ull-bump { animation: none; }
}

@media (max-width: 480px) {
  .ull .ull-bar { gap: .5rem; padding: .6rem .65rem; font-size: .86rem; }
  .ull .ull-stats { gap: 0 .6rem; }
  .ull .ull-stat { white-space: normal; }
  .ull a.ull-item__link,
  .ull a.ull-item__link:visited,
  .ull a.ull-item__link:hover,
  .ull a.ull-item__link:focus-visible { grid-template-columns: 60px minmax(0, 1fr); gap: .7rem; height: max(82px, 5.3rem); padding-inline: .15rem; }
  .ull .ull-item__img { width: 60px; max-width: 60px; height: 60px; }
  .ull .ull-item__title { font-size: .93rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ull .ull-stream.is-animated > .ull-item { transition: none; }
}
