/* The little app */
.vt-app {
  position: relative;
  min-height: 300px;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  background: var(--bg);
}
.demo .vt-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.demo .vt-list li {
  margin: 0;
}
.vt-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--rule);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .vt-row:hover {
    border-color: var(--muted);
  }
}
.vt-thumb {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 6px;
}
.vt-meta {
  display: grid;
  gap: 0.1rem;
}
.vt-title {
  width: fit-content;
  font-weight: 500;
}
.vt-meta small {
  color: var(--muted);
}
.vt-detail {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
}
.vt-back {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--rule);
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.vt-hero {
  display: block;
  width: 100%;
  height: 130px;
  border-radius: 10px;
}
.demo .vt-big {
  width: fit-content;
  margin: 0.2rem 0 0;
  font-size: 1.5em;
  font-weight: 500;
  line-height: 1.2;
}
.demo .vt-body {
  margin: 0;
  color: var(--muted);
}

.vt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  align-items: center;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 0.85em;
}
.vt-legend[hidden] {
  display: none;
}
.vt-k {
  display: inline-block;
  width: 18px;
  height: 10px;
  margin-right: -0.3rem;
}
.vt-k-group {
  border: 1.5px dashed var(--redline);
}
.vt-k-old {
  border: 1.5px solid var(--redline);
}
.vt-k-new {
  border: 1.5px solid var(--fg);
}

/* The real thing: style the pseudo-element tree while the demo runs. */
html.vt-slow::view-transition-group(*),
html.vt-slow::view-transition-image-pair(*),
html.vt-slow::view-transition-old(*),
html.vt-slow::view-transition-new(*) {
  animation-duration: 2.5s;
}
html.vt-xray::view-transition-group(vt-thumb),
html.vt-xray::view-transition-group(vt-title),
html.vt-xray::view-transition-group(vt-body) {
  outline: 1.5px dashed var(--redline);
}
html.vt-xray::view-transition-old(vt-thumb),
html.vt-xray::view-transition-old(vt-title),
html.vt-xray::view-transition-old(vt-body) {
  outline: 1.5px solid var(--redline);
  outline-offset: -1.5px;
}
html.vt-xray::view-transition-new(vt-thumb),
html.vt-xray::view-transition-new(vt-title),
html.vt-xray::view-transition-new(vt-body) {
  outline: 1.5px solid var(--fg);
  outline-offset: -1.5px;
}
html.vt-fit::view-transition-old(vt-thumb),
html.vt-fit::view-transition-new(vt-thumb) {
  height: 100%;
  overflow: clip;
  object-fit: cover;
}

/* Script fallback for browsers without the API */
.vt-sim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vt-sim-group {
  position: absolute;
  top: 0;
  left: 0;
}
.vt-sim-img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  box-sizing: border-box;
  object-fit: cover;
}
.vt-x .vt-sim-group {
  outline: 1.5px dashed var(--redline);
}
.vt-x .vt-sim-old {
  outline: 1.5px solid var(--redline);
}
.vt-x .vt-sim-new {
  outline: 1.5px solid var(--fg);
}

/* The tree */
.vt-tree .nest {
  padding: 0.35rem 0.5rem;
}
.vt-tree .nest .nest {
  margin-top: 0.35rem;
}
.vt-tree .nest p span {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.vt-tree .nest p b {
  flex: none;
  font-size: 0.85em;
}
.vt-tree .vt-old {
  border-color: var(--redline);
}
.vt-tree .vt-new {
  border-color: var(--fg);
}
