/* UKPackaging Expo 2026 — shared styles.
   Brand tokens (colours, fonts, badge sizing) live in theme.css —
   edit that file to re-brand; this file is layout/components only. */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--board);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- page chrome ---------- */

.tape-strip {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--green) 0 14px,
    var(--green-dark) 14px 28px,
    var(--green-tint) 28px 42px
  );
}

.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.wordmark .yr { color: var(--green-tint); }

.site-header .sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.04em;
  text-align: right;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}
.wrap.wide { max-width: 1080px; }

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 6px;
}
.page-lede { color: var(--ink-soft); margin: 0 0 24px; max-width: 54ch; }

/* ---------- label card ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 0 rgba(1, 2, 46, 0.06), 0 10px 28px rgba(1, 2, 46, 0.08);
}

.card + .card { margin-top: 16px; }

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dark);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

/* ---------- forms ---------- */

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 5px;
}
.field .hint { font-weight: 400; color: var(--ink-soft); }
.field-note {
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 5px;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.field input:focus-visible,
.field select:focus-visible,
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 1px;
}
.field .error-msg {
  color: var(--tape);
  font-size: 13px;
  margin-top: 4px;
  display: none;
}
.field.invalid input, .field.invalid select { border-color: var(--tape); }
.field.invalid .error-msg { display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 540px) { .grid-2 { grid-template-columns: 1fr; } }

.checkbox-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 10px;
  margin: 0 0 18px;
}
.checkbox-group legend {
  font-weight: 600;
  font-size: 14px;
  padding: 0 4px;
}
.checkbox-group .hint {
  font-weight: 400;
  color: var(--ink-soft);
}
.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  margin-top: 8px;
}
.checkbox-group input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.btn {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  font-size: 18px;
  border: none;
  border-radius: var(--radius);
  padding: 13px 26px;
  cursor: pointer;
  background: var(--green);
  color: var(--paper);
  display: inline-block;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--green-dark); }
.btn.block { width: 100%; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--board); }
.btn.danger { background: var(--tape); }
.btn:disabled { opacity: 0.55; cursor: wait; }

.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  background: #fff4f6;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
}
.notice.warn { border-left-color: var(--tape); background: #fff1f4; }

/* ---------- the badge: a parcel label ---------- */

.badge {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 4px;
  width: 100%;
  max-width: var(--badge-screen-max-width);
  margin: 0 auto;
  position: relative;
  padding: 0;
  overflow: hidden;
}
.badge .badge-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
}
.badge .badge-head .bm {
  display: flex;
  align-items: center;
  min-width: 0;
}
.badge .badge-logo {
  display: block;
  width: min(185px, 58vw);
  height: auto;
}
.badge .badge-head .type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.badge .badge-body { padding: 18px 16px 14px; text-align: center; }
.badge .b-name {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 34px;
  line-height: 1.02;
  letter-spacing: 0.02em;
  margin: 2px 0 6px;
  overflow-wrap: anywhere;
}
.badge .b-role { font-size: 15px; color: var(--ink-soft); }
.badge .b-co { font-weight: 600; font-size: 16px; }

.badge .b-qr {
  margin: 16px auto 8px;
  width: var(--badge-qr-size);
  height: var(--badge-qr-size);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  padding: 6px;
}
.badge .b-qr img, .badge .b-qr canvas { width: 100%; height: 100%; }

.badge .b-scanline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.badge .badge-foot {
  border-top: 2px dashed var(--line);
  padding: 10px 16px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.badge .ticket-no {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.06em;
}
.badge .event-meta {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-align: right;
}

/* rubber stamp for check-in state */
.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 26px;
  color: var(--success);
  border: 3px solid var(--success);
  border-radius: 6px;
  padding: 4px 16px;
  transform: rotate(-6deg);
  mix-blend-mode: multiply;
  opacity: 0.92;
}
.stamp.orange { color: var(--tape); border-color: var(--tape); }

/* ---------- tables / lists ---------- */

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar input[type="search"], .toolbar input[type="password"], .toolbar input[type="text"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  flex: 1;
  min-width: 180px;
}

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 18px;
  flex: 1;
  min-width: 140px;
}
.stat .n { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1; }
.stat .l { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }

.table-scroll { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: #f6f7fc;
  position: sticky;
  top: 0;
}
td.mono { font-family: var(--font-mono); font-size: 13px; }

.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.pill.in { background: var(--success-soft); border-color: var(--success); color: var(--success); }

/* staff search result rows */
.result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--line);
}
.result:last-child { border-bottom: none; }
.result .who strong { font-size: 16px; }
.result .who .meta { font-size: 13px; color: var(--ink-soft); }
.result .who .meta .tk { font-family: var(--font-mono); }

#scanner-box {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  min-height: 60px;
}

footer.site-foot {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 24px 16px 40px;
}

@media (prefers-reduced-motion: no-preference) {
  .card, .badge { animation: settle 0.35s ease-out; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- print: badge only, sized for a lanyard sleeve ---------- */

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .badge {
    max-width: none;
    width: var(--badge-print-width);
    margin: var(--badge-print-margin) auto;
    box-shadow: none;
    page-break-inside: avoid;
  }
}

/* ---------- logo mark ---------- */

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo-mark {
  display: block;
  width: min(236px, 68vw);
  height: auto;
  flex: none;
}
.brand .wordmark {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- privacy consent ---------- */

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.consent input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 1px; flex: none;
  accent-color: var(--green);
}
.consent.invalid { border-color: var(--tape); }
.consent .error-msg { color: var(--tape); display: none; margin-top: 4px; }
.consent.invalid .error-msg { display: block; }

/* ---------- small buttons (admin table) ---------- */

.btn.small { font-size: 14px; padding: 6px 12px; }

.pill.warnpill { background: #fff1f4; border-color: var(--tape); color: var(--tape); }
