/* Monetization (js/pages/monetization.js): Roblox's monetization page, live. It is an .st-page, so
   the charts, cards, tiles, tables and series colours are css/stats.css's: developer products take
   series 1 (blue) and passes series 2 (orange) everywhere, the chart and the badges alike. Money up
   is good here, so a tile's change is green or red (Analytics keeps its arrows in ink). */

/* ---------------------------------------------------------------- the head */
.mz-head {
  align-items: flex-end;
}
.mz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.mz-controls-2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mz-sub {
  align-items: center;
}
.mz-sub .mz-warn {
  color: var(--warning-ink);
}
.mz-live-dot {
  flex: none;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px oklch(69.6% 0.17 162.48 / 0.18);
  animation: mz-pulse 2s var(--ease) infinite;
}
.mz-live-dot.is-off {
  background: var(--ink-4);
  box-shadow: none;
  animation: none;
}
.mz-sub > span + span::before {
  content: none;
}
.mz-sub > span + span:not(:nth-child(2))::before {
  content: '·';
  margin: 0 8px;
  color: var(--ink-4);
}
@keyframes mz-pulse {
  50% {
    opacity: 0.45;
  }
}
.mz-note {
  margin-bottom: 16px;
}
.mz-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.mz-body > * {
  min-width: 0;
}

/* ---------------------------------------------------------------- live: today, the last hour, online */
.mz-live {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 14px;
}
.mz-live-card {
  gap: 4px;
  min-height: 142px;
}
.mz-live-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mz-live-h .mz-live-dot {
  margin-right: 0;
}
.mz-big {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-30);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.6s var(--ease);
}
.mz-live-s {
  margin-top: auto;
  font-size: var(--fs-12);
  color: var(--ink-3);
}
.mz-live-card .st-linechart {
  margin-top: 6px;
}
/* a sale just landed: today's number flashes green */
.mz-live-card.is-bump .mz-big {
  animation: mz-bump 1.6s var(--ease-out);
}
@keyframes mz-bump {
  0%,
  30% {
    color: var(--success-ink);
  }
}

/* ---------------------------------------------------------------- the tiles (they switch the chart) */
.mz-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.mz-tile {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 13px 15px 12px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.mz-tile:hover {
  background: color-mix(in srgb, var(--surface) 100%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.mz-tile.is-on {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
}
.mz-tile .st-tile-h {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mz-delta.is-up {
  color: var(--success-ink);
}
.mz-delta.is-down {
  color: var(--danger-ink);
}
.mz-delta .faint {
  color: var(--ink-4);
}

/* ---------------------------------------------------------------- the chart and the feed */
.mz-main {
  align-items: stretch;
}
.mz-chart {
  min-height: 330px;
}
.mz-feed {
  min-width: 0;
  max-height: 392px;
  padding-bottom: 6px;
}
.mz-feed .st-card-head {
  align-items: center;
}
.mz-feed-list {
  list-style: none;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 -16px;
  padding: 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mz-sale {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-2);
}
.mz-sale + .mz-sale {
  box-shadow: inset 0 1px 0 var(--line);
}
.mz-sale-ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  --h: var(--hue-blue);
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--h));
  background: oklch(var(--tone-dot-l) var(--tone-dot-c) var(--h) / var(--tone-fill-a));
}
.mz-sale-ico.is-pass {
  --h: var(--hue-orange);
}
.mz-sale-main,
.mz-sale-end {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.mz-sale-main b {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
}
.mz-sale-meta {
  font-size: var(--fs-12);
}
.mz-sale-end {
  justify-items: end;
  font-size: var(--fs-12);
}
.mz-sale-end b {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink);
}
/* a new sale slides in, lit green for a moment */
.mz-sale.is-new {
  animation: mz-in 2.4s var(--ease-out);
}
@keyframes mz-in {
  0% {
    opacity: 0;
    transform: translateY(-8px);
    background: oklch(69.6% 0.17 162.48 / 0.22);
  }
  12% {
    opacity: 1;
    transform: none;
    background: oklch(69.6% 0.17 162.48 / 0.22);
  }
  100% {
    background: transparent;
  }
}
.mz-feed-empty {
  padding: 8px 10px;
}

/* ---------------------------------------------------------------- tables and splits */
.mz-table {
  max-height: 360px;
}
.mz-item b {
  font-weight: 600;
  color: var(--ink);
}
.mz-kind {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--r-1);
  font-size: var(--fs-12);
  font-weight: 500;
  --h: var(--hue-blue);
  color: oklch(var(--tone-ink-l) var(--tone-ink-c) var(--h));
  background: oklch(var(--tone-dot-l) var(--tone-dot-c) var(--h) / var(--tone-fill-a));
}
.mz-kind.is-pass {
  --h: var(--hue-orange);
}
.mz-share {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 96px;
}
.mz-share-t {
  flex: none;
  display: block;
  width: 48px;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-2);
}
.mz-share-t i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--stats-series-1);
}
.mz-kvs {
  display: grid;
  gap: 8px;
}
.mz-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-13);
}
.mz-kv dt {
  color: var(--ink-3);
}
.mz-kv dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
.mz-kv small {
  font-weight: 500;
}
.mz-split {
  display: flex;
  gap: 2px;
  height: 10px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-2);
}
.mz-split i {
  display: block;
  min-width: 3px;
  background: var(--c);
}
.mz-foot {
  max-width: 64rem;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .mz-live-dot,
  .mz-sale.is-new,
  .mz-live-card.is-bump .mz-big {
    animation: none;
  }
}

/* ---------------------------------------------------------------- narrower */
@media (max-width: 1100px) {
  .mz-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mz-feed {
    grid-column: 1 / -1;
    max-height: 360px;
  }
}
/* the comparison and the currency sit at the right of the Stats bar */
.mz-bar .mz-controls-2 {
  margin-left: auto;
}
@media (max-width: 680px) {
  .mz-bar .mz-controls-2 {
    margin-left: 0;
  }
  .mz-live {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .mz-live > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .mz-live-card {
    min-height: 0;
  }
  .mz-big {
    font-size: var(--fs-24);
  }
  .mz-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .mz-tile .st-delta .faint {
    display: none;
  }
  .mz-chart {
    min-height: 0;
  }
  .mz-feed-list {
    margin: 0 -14px;
  }
}
/* beside the Stats agent's chat the page is narrower: the six tiles in two rows */
@media (max-width: 1760px) {
  .st-layout.has-rail .mz-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
