/* OpenPWA device-test lab — stylesheet.
 * Self-contained (does not load the demo or site CSS) so variant pages differ
 * only in the property under test. No web fonts, no shadows, no gradients.
 * Nothing here is position: fixed or sticky except the [data-top-element] of a
 * T4 variant page, which is the thing being tested. */

:root {
  --text: #161616;
  --text-secondary: #525252;
  --layer: #f4f4f4;
  --border: #e0e0e0;
  --background: #ffffff;
  --link: #0f62fe;
  --ok: #24a148;
  --no: #da1e28;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 42rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

a {
  color: var(--link);
  text-underline-offset: 2px;
}

.lab-header {
  background: #161616;
  color: #ffffff;
  padding: 12px 16px;
}

.lab-header a {
  color: #ffffff;
}

.lab-main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 28px;
  line-height: 36px;
  margin: 8px 0 16px;
}

h2 {
  font-size: 20px;
  line-height: 28px;
  margin: 32px 0 8px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

h3 {
  font-size: 16px;
  margin: 16px 0 4px;
}

.lab-context {
  background: var(--layer);
  border-left: 4px solid var(--link);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  word-break: break-word;
}

.lab-note {
  color: var(--text-secondary);
  font-size: 14px;
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

button {
  font: inherit;
  font-size: 15px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #0f62fe;
  border-radius: 4px;
  background: #0f62fe;
  color: #ffffff;
}

button.secondary {
  background: #ffffff;
  color: #0f62fe;
}

.lab-out {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  background: var(--layer);
  padding: 8px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 2.5em;
}

dl.lab-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2px 12px;
  font-size: 13px;
  line-height: 18px;
  font-family: var(--font-mono);
  margin: 8px 0;
}

dl.lab-list dt {
  color: var(--text-secondary);
  word-break: break-word;
}

dl.lab-list dd {
  margin: 0;
  word-break: break-word;
}

.lab-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.lab-icons img {
  display: block;
  width: 72px;
  height: 72px;
}

.lab-icons li {
  font-size: 12px;
  line-height: 16px;
  width: 96px;
}

textarea.lab-json {
  width: 100%;
  min-height: 12em;
  font-family: var(--font-mono);
  font-size: 12px;
}

table.lab-table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

table.lab-table th,
table.lab-table td {
  border: 1px solid var(--border);
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
}

/* ---- T4 variant pages ---------------------------------------------------- */

.variant-bar {
  background: #0f62fe;
  color: #ffffff;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  font-weight:600;
}

.variant-bar a {
  color: #ffffff;
}

.variant-bar--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.variant-bar--sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

.variant-bar--safe-area {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: auto;
  min-height: 56px;
  padding-top: env(safe-area-inset-top);
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.variant-spacer {
  height: 56px;
}

.variant-spacer--safe-area {
  height: calc(56px + env(safe-area-inset-top));
}

.variant-threshold {
  position: fixed;
  left: 0;
  z-index: 10;
  background: #da1e28;
}

.variant-lines {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.variant-lines li:nth-child(odd) {
  background: var(--layer);
}
