/* Hand-written rules of the demo site; the app's own styles are in styles.css. */

/* A move between two pages cross-fades instead of flashing, as in the app, where pages change without a reload. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 120ms;
}

/* What demo.js adds to a page. */

.demo-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid #e7e7ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  color: #6b6b7b;
  font-size: 14px;
  line-height: 20px;
  animation: demo-toast-in 160ms ease-out;
}

.demo-toast strong {
  color: #111;
  font-weight: 600;
}

@keyframes demo-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* A filter with a value looks filled and names the value, as in the app. */
[data-demo-filter]::after {
  content: '| ' attr(data-demo-filter);
  color: #111;
}

:has(> [data-demo-filter]) {
  border-style: solid;
  background: #f4f4f7;
}

[data-demo-picked] {
  background: #ececf1;
}

.demo-clear-filters {
  padding: 4px 8px;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.demo-clear-filters:hover {
  text-decoration: underline;
}

[data-demo-missing],
tr[data-demo-href] {
  cursor: pointer;
}

[data-demo-sort='asc'] button::after {
  content: ' ↑';
}

[data-demo-sort='desc'] button::after {
  content: ' ↓';
}
