/* =========================================================================
   exhibitors — sponsor/exhibitor hall, attendee badge QR, booth lead capture.
   Owns every .exh-* class. Colours come from the tokens in css/app.css, so
   light and dark both follow the shell; the only per-theme rules are the two
   tier tints at the bottom, where a flat token would lose the gold/platinum
   distinction on a dark surface.
   ========================================================================= */

/* ---------------------------------------------------------------- the hall */

.exh-intro .btn-row { margin-top: var(--s-3); }

.exh-hall-note {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.exh-search-wrap { margin: var(--s-4) 0 var(--s-3); }

.exh-search { width: 100%; display: block; }
.exh-search::-webkit-search-decoration,
.exh-search::-webkit-search-results-button { -webkit-appearance: none; }

.exh-filters { margin-bottom: var(--s-3); }

.exh-views { margin-bottom: var(--s-4); }

.exh-group-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin: var(--s-6) 0 var(--s-3);
}
.exh-group-head:first-child { margin-top: 0; }

.exh-group-title {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: .01em;
}

.exh-group-blurb {
  font-size: .78rem;
  color: var(--muted);
}

/* ------------------------------------------------------------- hall cards */

.exh-grid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .exh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exh-grid.tier-title { grid-template-columns: 1fr; }
}

.exh-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.exh-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.exh-card-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}

.exh-card-id { min-width: 0; }

.exh-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.exh-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: 5px;
}

.exh-logo {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .02em;
}

.exh-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.exh-tier {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--surface-2);
  color: var(--muted);
}

.exh-booth {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: .74rem;
  color: var(--muted);
}
.exh-booth-l { text-transform: uppercase; letter-spacing: .06em; }
.exh-booth-n { font-weight: 700; color: var(--ink); font-size: .84rem; }

.exh-sponsor-of {
  margin: 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
}
.exh-sponsor-of.big { font-size: .9rem; margin-top: var(--s-2); }

.exh-blurb {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--ink-2, var(--ink));
}

.exh-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: auto;
  padding-top: var(--s-1);
}

.exh-tag {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: .72rem;
  color: var(--muted);
}
.exh-tag.hiring {
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 34%, var(--surface));
  color: var(--success);
}
.exh-tag.offer {
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 34%, var(--surface));
  color: var(--navy);
}

/* -------------------------------------------------------------- booth list */

.exh-booth-row { padding: 0; }

.exh-booth-btn {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-3) var(--s-2);
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.exh-booth-btn:hover { background: var(--surface-2); }

.exh-booth-num {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 800;
  font-size: .9rem;
  text-align: center;
}

.exh-booth-body { flex: 1 1 auto; min-width: 0; }
.exh-booth-name { display: block; font-weight: 600; }
.exh-booth-sub { display: block; font-size: .78rem; color: var(--muted); }
.exh-booth-go { color: var(--muted); font-size: 1.2rem; }

/* ----------------------------------------------------------------- detail */

.exh-back { display: inline-block; margin-bottom: var(--s-3); }

.exh-hero-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.exh-hero-head .exh-logo { width: 60px; height: 60px; font-size: 1.05rem; }

.exh-hero-name { margin: 0; font-size: 1.22rem; line-height: 1.2; }

.exh-hero-actions { margin-top: var(--s-4); }

.exh-staff { border-left: 4px solid var(--accent); }

.exh-offer {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line);
}
.exh-offer:first-of-type { border-top: 0; padding-top: var(--s-2); }

.exh-offer-head { margin: 0 0 4px; font-size: .95rem; }
.exh-offer-body { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }

.exh-offer-code {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-3);
}

.exh-code {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .08em;
}

.exh-contact-list .exh-contact { align-items: center; gap: var(--s-3); }
.exh-contact-name { font-weight: 600; }
.exh-contact-side { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }

.exh-fact {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: .88rem;
}
.exh-fact:first-of-type { border-top: 0; }
.exh-fact-l { color: var(--muted); }
.exh-fact-v { font-weight: 600; text-align: right; }

/* ------------------------------------------------------------ the badge */

.exh-badge { text-align: center; }

.exh-qr {
  width: min(260px, 72vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto var(--s-3);
  padding: 10px;
  border-radius: var(--r);
  /* The code itself is always drawn dark-on-white: a QR inverted by a dark
     theme is unreadable to half the scanners in a trade-show hall. */
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-1);
}
.exh-qr svg { display: block; width: 100%; height: 100%; }

.exh-badge-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--s-3);
}
.exh-badge-name { font-size: 1.05rem; }
.exh-badge-org { color: var(--muted); font-size: .9rem; }
.exh-badge-code {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
}

.exh-badge .btn-row { justify-content: center; }

.exh-steps { margin: 0; padding-left: 1.1rem; }
.exh-steps li { margin-bottom: 6px; font-size: .88rem; line-height: 1.45; }
.exh-steps li:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------- the scanner */

.exh-scan-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-bottom: var(--s-3);
  border-radius: var(--r);
  overflow: hidden;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exh-video { width: 100%; height: 100%; object-fit: cover; }

.exh-reticle {
  position: absolute;
  inset: 18% 22%;
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: var(--r);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .28);
}

.exh-scan-off {
  padding: var(--s-4);
  text-align: center;
  color: rgba(255, 255, 255, .84);
}
.exh-scan-off-icon { font-size: 1.6rem; display: block; margin-bottom: var(--s-2); }

.exh-scan-hint { margin: 0 0 var(--s-3); }

.exh-code-row {
  display: flex;
  gap: var(--s-2);
  align-items: stretch;
}
.exh-code-row input { flex: 1 1 auto; }
.exh-code-row .btn { flex: 0 0 auto; }

.exh-byhand { display: inline-block; margin-top: var(--s-3); }

/* -------------------------------------------------------- lead capture UI */

.exh-lead-who {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.exh-lead-name { font-weight: 700; }

.exh-stars { display: flex; gap: 2px; }

.exh-star {
  min-width: 40px;
  min-height: 40px;
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--line-strong);
  padding: 0;
}
.exh-star.on { color: var(--orange); }
.exh-star:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }

.exh-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
  margin: var(--s-3) 0;
}

.exh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--s-3) var(--s-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.exh-stat-n { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.exh-stat-l { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; }

.exh-lead { align-items: flex-start; gap: var(--s-3); }
.exh-lead-title { font-weight: 600; }
.exh-lead-note {
  margin: 6px 0 0;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
}
.exh-lead-meta {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: 6px;
}
.exh-rating { color: var(--orange); letter-spacing: .06em; font-size: .86rem; }

.exh-lead-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
  align-items: stretch;
}
.exh-lead-del { color: var(--danger); }

@media (max-width: 480px) {
  .exh-lead { flex-direction: column; }
  .exh-lead-side { flex-direction: row; width: 100%; }
  .exh-lead-side .btn { flex: 1 1 0; }
  .exh-contact-side { justify-content: flex-start; }
}

/* --------------------------------------------------------------- tiers */

.exh-card.tier-title { border-left-color: var(--navy); }
.exh-card.tier-platinum { border-left-color: var(--slate); }
.exh-card.tier-gold { border-left-color: var(--orange); }
.exh-card.tier-exhibitor { border-left-color: var(--line-strong); }

.exh-tier.tier-title { background: var(--navy); color: #fff; }
.exh-tier.tier-platinum { background: color-mix(in srgb, var(--slate) 18%, var(--surface)); color: var(--slate); }
.exh-tier.tier-gold { background: color-mix(in srgb, var(--orange) 20%, var(--surface)); color: #8a4413; }
.exh-tier.tier-exhibitor { background: var(--surface-2); color: var(--muted); }

.exh-logo.tier-title { background: var(--navy); color: #fff; }
.exh-logo.tier-platinum { background: color-mix(in srgb, var(--slate) 20%, var(--surface)); color: var(--slate); }
.exh-logo.tier-gold { background: color-mix(in srgb, var(--orange) 22%, var(--surface)); color: #8a4413; }

.exh-booth-num.tier-title { background: var(--navy); color: #fff; }
.exh-booth-num.tier-gold { background: color-mix(in srgb, var(--orange) 22%, var(--surface)); color: #8a4413; }

.exh-hero.tier-title { border-top: 3px solid var(--navy); }

/* Dark: the gold ink above is a light-surface brown; lift it, and give the
   navy tier pill a readable edge against a dark card. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .exh-tier.tier-gold,
  :root:not([data-theme="light"]) .exh-logo.tier-gold,
  :root:not([data-theme="light"]) .exh-booth-num.tier-gold { color: var(--orange); }
  :root:not([data-theme="light"]) .exh-tier.tier-title,
  :root:not([data-theme="light"]) .exh-logo.tier-title,
  :root:not([data-theme="light"]) .exh-booth-num.tier-title { background: var(--blue); color: #fff; }
  :root:not([data-theme="light"]) .exh-stat-n { color: var(--ink); }
  :root:not([data-theme="light"]) .exh-logo,
  :root:not([data-theme="light"]) .exh-booth-num { color: var(--ink); }
  :root:not([data-theme="light"]) .exh-logo.tier-title { color: #fff; }
  :root:not([data-theme="light"]) .exh-tag.offer { color: var(--ink); }
}

:root[data-theme="dark"] .exh-tier.tier-gold,
:root[data-theme="dark"] .exh-logo.tier-gold,
:root[data-theme="dark"] .exh-booth-num.tier-gold { color: var(--orange); }
:root[data-theme="dark"] .exh-tier.tier-title,
:root[data-theme="dark"] .exh-logo.tier-title,
:root[data-theme="dark"] .exh-booth-num.tier-title { background: var(--blue); color: #fff; }
:root[data-theme="dark"] .exh-stat-n { color: var(--ink); }
:root[data-theme="dark"] .exh-logo,
:root[data-theme="dark"] .exh-booth-num { color: var(--ink); }
:root[data-theme="dark"] .exh-logo.tier-title { color: #fff; }
:root[data-theme="dark"] .exh-tag.offer { color: var(--ink); }

/* ------------------------------------------------------------------ print */

/* Printing the badge screen gives a paper badge that still scans. */
@media print {
  .exh-back,
  .exh-badge .btn-row,
  .exh-badge-help { display: none !important; }
  .exh-badge { box-shadow: none; border: 1px solid #000; }
  .exh-qr { border-color: #000; }
}
