/* Conditions page. Scoped under body.page-template-page-conditions-php
   (curl the live page to confirm the class; WP also adds the short
   page-template-page-conditions form). */

/* Colors are the dark Barlow system's existing hex values, declared once as
   page-scoped tokens (the :root tokens in style.css are the old palette). */
body.page-template-page-conditions-php,
body.conditions-embed {
  --cond-ink: #07030b;
  --cond-cream: #f9f5ed;
  --cond-amber: #e6a533;
  --cond-blue: #0d5fa3;
  --cond-red: #e8321f;
  --cond-orange: #f56000;
  --cond-font-title: 'Barlow Condensed', sans-serif;
  --cond-font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

body.page-template-page-conditions-php,
body.conditions-embed {
  background: var(--cond-ink);
  color: var(--cond-cream);
}

body.conditions-embed {
  margin: 0;
  overflow: hidden;
}

.cond-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 111px); /* site header height, matches #main-content padding */
  height: calc(100dvh - 111px);
  overflow: hidden;
}

body.conditions-embed #main-content {
  padding-top: 0; /* style.css reserves 111px for the site header, which embed mode doesn't render */
}

body.conditions-embed .cond-viewport {
  height: 100vh;
  height: 100dvh;
}

.cond-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  opacity: 0;
}

.cond-stage.is-ready {
  opacity: 1;
}

/* Faceplate layout in the 1127 x 686 design space (from the mockup). The
   stage is scaled as a unit by faceplate.js, so everything here is px. */
.cond-stage {
  background: linear-gradient(180deg, var(--cond-blue) 0%, var(--cond-blue) 62%, var(--cond-red) 100%);
}

.cond-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 128px;
}

.cond-title {
  position: absolute;
  top: 28px;
  left: 56px;
  padding: 8px 30px 6px;
  border: 4px solid var(--cond-cream);
  border-radius: 26px;
  background: var(--cond-blue);
  box-shadow: 6px 6px 0 var(--cond-ink);
  font: 800 52px/1 var(--cond-font-title);
  letter-spacing: 0.02em;
  color: var(--cond-cream);
}

.cond-location {
  position: absolute;
  top: 70px;
  left: 395px;
  font: 700 13px/1 var(--cond-font-mono);
  letter-spacing: 0.04em;
  color: var(--cond-cream);
}

.cond-rule {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--cond-cream);
}

.cond-rule--top {
  top: 128px;
}

.cond-grid {
  position: absolute;
  top: 150px;
  left: 52px;
  width: 1023px;
  height: 340px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
}

.cond-rack {
  position: absolute;
  top: 496px;
  left: 52px;
  width: 1023px;
  height: 112px;
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 2fr;
  gap: 6px;
}

.cond-panel {
  position: relative;
  padding: 12px 14px;
  border: 3px solid var(--cond-cream);
  background: rgba(7, 3, 11, 0.18);
  box-shadow: 5px 5px 0 var(--cond-ink);
}

.cond-panel h2 {
  margin: 0;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--cond-cream);
  font: 700 18px/1 var(--cond-font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cond-cream);
}

.cond-ticker {
  position: absolute;
  top: 626px;
  left: 0;
  right: 0;
  height: 36px;
  border-top: 4px solid var(--cond-cream);
  border-bottom: 4px solid var(--cond-cream);
  background: rgba(7, 3, 11, 0.55);
}
