/* Minimal chrome for the Field3 viewer-comparison app. This is a product
   shell, not a Leptos demo -- deliberately plain rather than themed.
   Ported from the sibling field2-leptos app's own styles/app.css (itself
   ported from controls2-leptos/workbench2-leptos), plus a few additions
   for storey checkboxes and the appearance summary. */

:root {
  color-scheme: light dark;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
}

.shell {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 1.5rem) 3rem;
}

.experimental-banner {
  background: #7a2e0e;
  color: #fff;
  text-align: center;
  font-weight: 600;
  padding: 0.5rem 1rem;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 1.4rem;
}

.lede {
  color: #555;
  max-width: 60ch;
}

.open-file {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1.5rem 0;
}

.hint {
  color: #666;
  font-style: italic;
}

.status-ok {
  color: #1a7a3a;
}

.status-err {
  color: #b3261e;
  white-space: pre-wrap;
}

.summary .file-name {
  font-weight: 600;
}

table {
  border-collapse: collapse;
  font-size: 0.9rem;
}

caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

th,
td {
  border: 1px solid #ccc;
  padding: 0.25rem 0.5rem;
  text-align: left;
}

.property-inspector {
  margin: 1.5rem 0;
}

.attribute-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 0.75rem;
  margin: 0.5rem 0 1rem;
}

.attribute-list dt {
  font-weight: 600;
}

.attribute-list dd {
  margin: 0;
}

.global-id {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: #666;
}

.viewer {
  margin-top: 2rem;
}

canvas {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid #ccc;
  background: #111;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

canvas[hidden] {
  display: none;
}

.storeys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0;
}

.storeys label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  min-height: 2.75rem;
  padding: 0 0.35rem;
}

.appearance-summary {
  font-size: 0.85rem;
  color: #555;
}

.mobile-webgpu-note {
  font-size: 0.85rem;
  border-left: 3px solid #888;
  padding-left: 0.6rem;
  color: #555;
}

button,
input[type="file"] {
  min-height: 2.75rem;
  font: inherit;
}

button {
  padding: 0.45rem 0.75rem;
}

.storeys-panel,
.appearance-panel,
.properties-panel,
.fixture-flow-panel,
.resource-panel {
  margin-top: 1.75rem;
}

.fixture-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
}

.fixture-outbox-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.fixture-outbox-entry {
  border: 1px solid #c8c8c8;
  border-radius: 0.45rem;
  padding: 0.7rem;
}

.fixture-outbox-entry p {
  margin: 0.4rem 0;
  overflow-wrap: anywhere;
}

.prepared-package-panel,
.fixture-evidence-panel,
.fixture-archive-panel {
  margin-top: 1rem;
}

.prepared-package-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.prepared-package {
  border-left: 3px solid #376d4f;
  background: #f4f8f5;
  padding: 0.65rem;
}

.prepared-package p {
  margin: 0.35rem 0;
}

.fixture-archive-panel textarea {
  box-sizing: border-box;
  display: block;
  min-height: 10rem;
  width: 100%;
  margin-top: 0.75rem;
  font: 0.78rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.fixture-evidence-record {
  border-left: 3px solid #5e4b8b;
  background: #f8f6fc;
  margin-top: 0.65rem;
  padding: 0.65rem;
}

.fixture-evidence-record p {
  margin: 0.4rem 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .shell {
    padding-inline: 0.9rem;
  }

  .experimental-banner {
    margin-inline: -0.9rem;
    padding-inline: 0.9rem;
    font-size: 0.82rem;
  }

  h1 {
    font-size: 1.2rem;
  }

  .viewer {
    margin-top: 1.4rem;
  }

  .storeys {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .storeys label {
    border: 1px solid #ccc;
    border-radius: 0.35rem;
    padding: 0.4rem 0.55rem;
  }
}
