/*
 * Shelf API sandbox – layout of this app only. Colours, fonts, radii and shadows come from /kit.
 */

/* The start page, header extras, access card and task list moved to the kit (components.css, "Sandbox start page"). */

/* ── REST docs (Swagger UI; its theme is kit/swagger.css) ── */
.docs-head .plate {
  max-width: var(--measure);
}
.swagger-host {
  min-height: 60vh;
}

/* ── GraphQL explorer ───────────────────────────── */
.explorer {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 960px) {
  .explorer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}
@media (min-width: 1280px) {
  .explorer {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 19rem;
  }
}
.editor .card__body {
  display: grid;
  gap: var(--space-3);
}
.code-input {
  min-height: 16rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
}
.code-input--vars {
  min-height: 5rem;
}
.editor__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.result .card__head {
  align-items: center;
}
.result__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
}
.result pre {
  margin: 0;
  min-height: 16rem;
  max-height: 70vh;
  overflow: auto;
  padding: var(--space-4);
  background: var(--sunken);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.6;
}
.result .empty {
  margin: var(--space-4);
}
.j-key { color: var(--accent); }
.j-str { color: var(--ok); }
.j-num { color: var(--violet); }
.j-lit { color: var(--warn); }

.schema {
  font-size: var(--text-sm);
}
@media (min-width: 1280px) {
  .schema {
    position: sticky;
    top: calc(var(--header-h) + var(--space-4));
    max-height: calc(100vh - var(--header-h) - 2 * var(--space-4));
    overflow: auto;
  }
}
@media (min-width: 960px) and (max-width: 1279px) {
  .schema {
    grid-column: 1 / -1;
  }
}
.schema details {
  border-top: 1px solid var(--line);
}
.schema details:first-of-type {
  border-top: 0;
}
.schema summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  cursor: pointer;
  font-weight: 600;
}
.schema ul {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0 var(--space-4) var(--space-4);
  list-style: none;
}
.schema li {
  min-width: 0;
  overflow-wrap: anywhere;
}
.sig {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.sig__type {
  color: var(--violet);
}
.sig__desc {
  display: block;
  color: var(--ink-3);
  font-size: var(--text-xs);
}

/* ── Workbench (start page): a fixed address for GraphQL, the request editor, history ── */
.req-edit .code-surface {
  min-height: 7rem;
}
.req-edit .code-surface:last-child {
  min-height: 14rem;
}
.req-edit .code-surface--short {
  min-height: 5.5rem;
}
.history-head {
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.history__method {
  font-weight: 700;
  color: var(--accent);
}
.history__req {
  overflow-wrap: anywhere;
}
.task-note {
  padding-bottom: 0;
}
#p-reference .layout-split {
  margin-top: 0;
}
@media (max-width: 1199px) {
  .req-edit .code-surface:last-child {
    min-height: 8rem;
  }
}
