/* The assignee card that grows out of their name in the ticket: two issues of Tessel, an invented issue tracker, on
   black. The chip of the assignee (little avatar and name) is the seed: the card's body (.pop__bg) grows from the
   chip's rectangle, and the avatar and the name are the same pieces moved into the card (shared element, FLIP). */
:root {
  --page: #000000;            /* the page */
  --row: #0c0c0f;             /* the list of issues */
  --line: rgba(255, 255, 255, 0.07); /* thin rules and edges */
  --card: #141418;            /* the body of the card */
  --edge: rgba(255, 255, 255, 0.09); /* the card's edge */
  --ink: #ededf1;             /* the words */
  --muted: #8b8b97;           /* the small words */
  --faint: #5d5d68;           /* the keys of the issues */
  --accent: #9b9cff;          /* the one accent: light, icons, priority */
  --button: #ededf1;          /* the main button */
  --button-ink: #0b0b0e;      /* the words on the main button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
}

.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vh, 28px) clamp(10px, 4vw, 28px);
  overflow: hidden;
}

/* the board holds the list and keeps room under it for the card, so the whole thing stays centred */
.board {
  position: relative;
  width: min(460px, 100%);
  padding-bottom: var(--room, 200px);
}

.issues {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.9);
}

.issue {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 8px 0 14px;
  font-size: 13px;
  letter-spacing: 0.005em;
}

.issue + .issue {
  border-top: 1px solid var(--line);
}

.issue__prio {
  flex: none;
  width: 14px;
  height: 14px;
  fill: var(--muted);
}

.issue__prio .off {
  fill: rgba(255, 255, 255, 0.14);
}

.issue__key {
  flex: none;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-stretch: 92%;
}

.issue__title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d6d6dc;
}

/* the assignee chip: a quiet pill, the seed of the card */
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px 0 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  cursor: default;
  transition: background-color 0.25s, border-color 0.25s;
}

.chip.is-hover,
.chip[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

@media (hover: hover) {
  .chip:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.06);
  }
}

.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chip__av,
.av {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 640;
  background: var(--grad);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.chip__av {
  width: 20px;
  height: 20px;
  font-size: 8px;
  letter-spacing: 0.02em;
}

.chip__name,
.pop__name {
  font-weight: 560;
  white-space: nowrap;
}

.chip__name {
  font-size: 13px;
  color: #e4e4ea;
}

[data-chip="ines"] .chip__av,
.pop[data-who="ines"] .av {
  --grad: radial-gradient(120% 120% at 25% 15%, #c9b8ff 0%, #8f83ff 45%, #5848d8 100%);
}

[data-chip="kofi"] .chip__av,
.pop[data-who="kofi"] .av {
  --grad: radial-gradient(120% 120% at 25% 15%, #a9d7ff 0%, #6f8dff 48%, #3d4fc9 100%);
}

/* the card */
.pop {
  position: absolute;
  left: 0;
  top: 0;
  width: min(296px, calc(100vw - 24px));
  z-index: 2;
  visibility: hidden;
}

.pop__bg {
  --lift: 0;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #19191e 0%, var(--card) 38%, #111114 100%);
  border: 1px solid var(--edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, calc(var(--lift) * 0.07)) inset,
    0 2px 4px rgba(0, 0, 0, calc(var(--lift) * 0.5)),
    0 14px 28px -8px rgba(0, 0, 0, calc(var(--lift) * 0.7)),
    0 36px 70px -20px rgba(0, 0, 0, calc(var(--lift) * 0.85));
}

/* a soft light behind the avatar that leans towards the pointer */
.pop__sheen {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(160px 120px at var(--sx, 18%) var(--sy, 0%), rgba(155, 156, 255, 0.2), rgba(155, 156, 255, 0) 70%);
}

.pop__in {
  position: relative;
  padding: 16px 16px 14px;
}

.pop__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.av {
  flex: none;
  width: 40px;
  height: 40px;
  font-size: 15px;
  letter-spacing: 0.01em;
  transform-origin: 0 0;
}

.pop__who {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.pop__name {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  transform-origin: 0 50%;
  justify-self: start;
}

.pop__role {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pop__rule {
  height: 1px;
  margin: 14px 0 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  transform-origin: 0 50%;
}

.pop__line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12.5px;
  height: 18px;
  white-space: nowrap;
}

.pop__soft {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.clock,
.state {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clock__h,
.clock__m {
  transform-box: view-box;
  transform-origin: 8px 8px;
}

/* the time: hours as text, each minute digit a little column that rolls */
.time {
  display: inline-flex;
  align-items: center;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
  height: 18px;
}

.roll {
  display: block;
  height: 18px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}

.roll__col {
  display: flex;
  flex-direction: column;
}

.roll__col span {
  height: 18px;
}

.time__ap {
  margin-left: 3px;
  color: var(--muted);
  font-weight: 480;
}

.pop__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.act {
  position: relative;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s, border-color 0.25s;
}

.act--main {
  border-color: transparent;
  background: var(--button);
  color: var(--button-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 6px 14px -6px rgba(155, 156, 255, 0.55);
}

.act.is-hover {
  background: rgba(255, 255, 255, 0.07);
}

.act--main.is-hover {
  background: #ffffff;
}

@media (hover: hover) {
  .act:hover {
    background: rgba(255, 255, 255, 0.07);
  }

  .act--main:hover {
    background: #ffffff;
  }
}

.act:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.act__icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.act__tick {
  stroke: var(--accent);
  stroke-width: 1.7;
}

.act__lab {
  display: inline-block;
}

/* the drawn pointer of the demo walk */
.ghost {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  fill: #f4f4f6;
  stroke: #000;
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

@media (max-width: 380px) {
  .issue {
    gap: 8px;
    padding-left: 11px;
  }

  .issue__key {
    display: none;
  }
}
