@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap");

:root {
  --ink: #121411;
  --paper: #E5E3DC;
  --panel: #DBD8CF;
  --card: #E5E3DC;
  --muted: rgba(18, 20, 17, 0.62);
  --border-soft: #4e4a3f;
  --border: #9b978d;
  --accent: #121411;
  --error: #8B4E38;

  /* Guest-entry hero and scan card. Defaults match the original look; a
     brand theme (client/branding/<slug>/theme.css) overrides these. The
     *-rgb tokens are bare "r, g, b" triplets so they can take an alpha. */
  --panel-dark: #2C231A;
  --panel-dark-mid: #4A3B2F;
  --panel-dark-accent: #7A5E43;
  --on-dark-ink: #F5F2EE;
  --on-dark-muted: #D6CEC3;
  --on-dark-hairline: rgba(122, 94, 67, 0.4);
  --shadow-rgb: 44, 35, 26;
  --glow-rgb: 139, 78, 56;
  --card-frame: rgba(214, 206, 195, 0.6);

  font-family: "Manrope", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

.site-header {
  border-bottom: 1px solid var(--border-soft);
  padding: 28px clamp(20px, 6vw, 64px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.site-header .org-name {
  font-family: "Cormorant Garamond", ui-serif, Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
}

.site-header nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--muted);
}

main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 6vw, 24px) 80px;
}

main.wide {
  max-width: 960px;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 10px;
}

.lede {
  font-size: 1rem;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.5;
  margin: 14px 0 40px;
}

form {
  display: grid;
  gap: 26px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea {
  font: inherit;
  font-weight: 300;
  font-size: 1.15rem;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  color: var(--ink);
  width: 100%;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
  color: var(--border);
  font-weight: 300;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
}

input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.repeatable-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.repeatable-row .field {
  flex: 1;
}

textarea {
  resize: vertical;
  min-height: 76px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  padding: 14px 16px;
  font-size: 1rem;
}

.field-error {
  font-size: 0.8rem;
  color: var(--error);
}

.id-type-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  min-height: 1.1em;
}

.id-type-hint:empty {
  display: none;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  padding-top: 4px;
}

.consent input {
  margin-top: 4px;
  accent-color: var(--ink);
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

button,
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 16px 28px;
  border: 1px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: var(--paper);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

button:hover,
.btn:hover {
  filter: brightness(0.85);
}

button.secondary,
.btn.secondary {
  background: transparent;
  color: var(--ink);
}

button.secondary:hover,
.btn.secondary:hover {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--ink);
}

button.small {
  padding: 9px 16px;
  font-size: 0.78rem;
  border-radius: 0;
}

.banner {
  border: 1px solid var(--border-soft);
  border-radius: 0;
  padding: 14px 18px;
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.banner.error {
  border-color: var(--error);
  color: var(--error);
}

.confirm-panel {
  border: 1px solid var(--border-soft);
  border-radius: 0;
  padding: clamp(28px, 5vw, 44px);
  display: grid;
  gap: 18px;
  background: var(--card);
}

.confirm-panel dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 0.95rem;
}

.confirm-panel dt {
  color: var(--muted);
}

.confirm-panel dd {
  margin: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

th {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

tbody tr:hover {
  background: var(--panel);
}

.status-pill {
  display: inline-block;
  padding: 4px 11px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill.on-site {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 700;
}

.status-pill.departed {
  color: var(--muted);
}

.checkout-form {
  margin: 0;
}

.empty-state {
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  border: 1px dashed var(--border-soft);
  border-radius: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 0;
}

.table-wrap table {
  min-width: 760px;
}

.stats-panel {
  margin-bottom: 32px;
}

.chart-frame {
  display: block;
  width: 100%;
  height: 260px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.header-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--card);
  margin-bottom: 24px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Reused on checkin.php's confirmation page (the wifi/refreshments info
   that used to live in the left info panel), directly under an .eyebrow
   heading -- no extra top margin needed there. */
.amenities {
  display: grid;
  gap: 12px;
}

.amenity-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 0;
  padding: 16px;
}

.amenity-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
}

.amenity-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.amenity-card span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.form-panel {
  flex: 1;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Standalone (no left info panel) variant -- bounds the centered form so
   it doesn't stretch edge-to-edge on wide screens now that nothing else
   shares the row with it. */
.form-panel-solo {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.form-panel-inner {
  width: 100%;
  max-width: 440px;
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.phone-prefix {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  padding: 14px 0;
}

.phone-row input {
  border-bottom: none;
}

.purpose-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.purpose-pill {
  padding: 9px 16px;
  border-radius: 0;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
}

.purpose-pill:hover,
.purpose-pill.selected {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

/* Accent-color swatch picker (org/dashboard.php) -- same selectable-pill
   idiom as .purpose-pill above, but each option is a color swatch (its own
   background, not the org's brand accent) rather than text. The curated
   set replaces a free-form <input type="color">, so an org can only ever
   land on one of these four values. */
.accent-swatch-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.accent-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.accent-swatch input {
  margin: 0;
  accent-color: var(--ink);
}

.accent-swatch-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.accent-swatch:has(input:checked) {
  border-color: var(--ink);
  color: var(--ink);
}

/* A brand theme owns this org's colours (admin/dashboard.php). */
.accent-swatch-picker.is-locked .accent-swatch {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 860px) {
  .header-meta {
    display: none;
  }
}

footer {
  border-top: 1px solid var(--border-soft);
  padding: 20px clamp(20px, 6vw, 64px);
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--ink);
}

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 600;
  font-style: italic;
  color: var(--muted);
  cursor: help;
}

.info-tip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 260px;
  max-width: min(260px, 80vw);
  padding: 10px 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  z-index: 10;
}

.info-tip:hover .info-tip-text,
.info-tip:focus .info-tip-text,
.info-tip:focus-within .info-tip-text {
  display: block;
}
