/* Demos for tools that observe a page: read, see and diagnose. */

/* 1. Read: a scan line passes over the page and compact rows come out. */
.demo--read .d-sheet {
  top: 14%;
  bottom: 14%;
  left: 7%;
  display: grid;
  gap: 7px;
  align-content: start;
  overflow: hidden;
  width: 34%;
  padding: 12px 10px;
}

.demo--read .d-sheet i {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: #dfe2ea;
}

.demo--read .d-sheet i:first-child {
  width: 60%;
  height: 8px;
  background: #1d2233;
}

.demo--read .d-sheet u {
  position: absolute;
  right: 0;
  left: 0;
  height: 22px;
  background: linear-gradient(rgba(249, 67, 154, 0), rgba(249, 67, 154, 0.3));
  border-bottom: 2px solid var(--k-pink);
  opacity: 0;
  animation: demo-scan var(--t) ease-in-out infinite;
}

.d-rows {
  position: absolute;
  top: 50%;
  right: 6%;
  display: grid;
  gap: 7px;
  width: 46%;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%);
}

.d-rows li {
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: demo-row var(--t) ease infinite;
}

.d-rows li:nth-child(2) {
  animation-delay: 0.5s;
}

.d-rows li:nth-child(3) {
  animation-delay: 1s;
}

.d-rows b {
  margin-right: 6px;
  color: var(--k-mint);
  font-family: var(--k-mono);
  font-weight: 500;
}

@keyframes demo-scan {
  0%,
  4% {
    top: -22px;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  34% {
    top: 100%;
    opacity: 1;
  }

  38%,
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes demo-row {
  0%,
  14% {
    opacity: 0;
    transform: translateX(-10px);
  }

  22%,
  90% {
    opacity: 1;
    transform: none;
  }

  97%,
  100% {
    opacity: 0;
    transform: none;
  }
}

/* 2. See: numbered labels land on the controls, then one is clicked. */
.demo--see .d-sheet {
  inset: 12% 9% 30%;
}

.d-el {
  position: absolute;
  border-radius: 5px;
  background: #e6e9f1;
}

.d-el--a {
  top: 16%;
  right: 8%;
  width: 22%;
  height: 14%;
}

.d-el--b {
  top: 46%;
  left: 8%;
  width: 52%;
  height: 20%;
  border: 1.5px solid #cfd3de;
  background: #fff;
}

.d-el--c {
  top: 46%;
  right: 8%;
  width: 26%;
  height: 20%;
  background: var(--k-ink);
  animation: demo-press var(--t) ease infinite;
}

.d-el em {
  position: absolute;
  top: -9px;
  left: -9px;
  display: grid;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--k-pink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  place-items: center;
  animation: demo-pop var(--t) ease infinite;
}

.d-el--b em {
  animation-delay: 0.35s;
}

.d-el--c em {
  animation-delay: 0.7s;
}

.d-chip {
  position: absolute;
  right: 9%;
  bottom: 9%;
  left: 9%;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--k-mint);
  font-family: var(--k-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: demo-late var(--t) ease infinite;
}

@keyframes demo-pop {
  0%,
  8% {
    opacity: 0;
    transform: scale(0.2);
  }

  14% {
    opacity: 1;
    transform: scale(1.2);
  }

  18%,
  92% {
    opacity: 1;
    transform: none;
  }

  98%,
  100% {
    opacity: 0;
  }
}

@keyframes demo-press {
  0%,
  52%,
  64%,
  100% {
    box-shadow: 0 0 0 0 rgba(249, 67, 154, 0);
    transform: none;
  }

  57% {
    box-shadow: 0 0 0 7px rgba(249, 67, 154, 0.4);
    transform: scale(0.92);
  }
}

@keyframes demo-late {
  0%,
  40% {
    opacity: 0;
    transform: translateY(6px);
  }

  48%,
  92% {
    opacity: 1;
    transform: none;
  }

  98%,
  100% {
    opacity: 0;
  }
}

/* 3. Diagnose: requests stream in and the failing one stands out. */
.d-net {
  position: absolute;
  inset: 12% 8%;
  display: grid;
  gap: 7px;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--k-mono);
}

.d-net li {
  display: flex;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  animation: demo-row var(--t) ease infinite;
}

.d-net li:nth-child(2) {
  animation-delay: 0.45s;
}

.d-net li:nth-child(3) {
  animation-delay: 0.9s;
}

.d-net li:nth-child(4) {
  animation-delay: 1.5s;
}

.d-net b {
  width: 34px;
  color: var(--k-sky);
  font-weight: 500;
}

.d-net span {
  margin-left: auto;
  color: var(--k-mint);
}

.d-net .bad {
  background: rgba(249, 67, 154, 0.22);
  box-shadow: inset 0 0 0 1px rgba(249, 67, 154, 0.6);
}

.d-net .bad span,
.d-net .bad b {
  color: #ff9cc8;
}
