/* The Stats agent's artifacts (js/artifacts.js; docs/stats-agent.md §2): a page it presented, in a
   card with its title, Open and Full screen, the page in a sandboxed frame whose height follows it
   (200-900 px, then it scrolls inside), and the same page full screen. In the chat and on the Stats
   page's dashboard cards. Only tokens.css's custom properties. */

.artifact {
  display: grid;
  margin: 10px 0;
  min-width: 0;
  border-radius: var(--r-4);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.artifact-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 6px 4px 12px;
  box-shadow: inset 0 -1px 0 var(--line);
  font-size: var(--fs-13);
  color: var(--ink-2);
}
.artifact-head > .i {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}
.artifact-title {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
}
.artifact-acts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.artifact-acts .btn .i {
  width: 13px;
  height: 13px;
}
.artifact-body {
  min-width: 0;
  background: var(--surface);
}
.artifact-iframe {
  display: block;
  width: 100%;
  min-height: 200px;
  max-height: 900px;
  border: 0;
  background: transparent;
  color-scheme: normal;
  transition: height var(--t-med) var(--ease);
}
.artifact-named {
  font-size: var(--fs-13);
  color: var(--ink-3);
}

/* full screen: the same page at the viewport's size */
.dialog.artifact-full {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 32px);
  height: calc(100dvh - 32px);
  max-height: none;
  overflow: hidden;
}
.artifact-full-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px 8px 18px;
  box-shadow: inset 0 -1px 0 var(--line);
}
.artifact-full-head h2 {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-15);
  font-weight: 600;
}
.artifact-full-body {
  flex: 1;
  min-height: 0;
}
.artifact-full-body .artifact-iframe {
  height: 100%;
  max-height: none;
}

/* the quiet chat's one "Working…" line */
.working.is-quiet {
  box-shadow: none;
}
@media (max-width: 720px) {
  .dialog.artifact-full {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
}
