/* ===== Theme & variables ===== */
:root {
  --accent: #26a9dd;   /* header/footer bar */
  --primary: #0072ad;  /* buttons (Confirm/Done) */
  --primary-inverse: #ffffff;
  color-scheme: light !important; /* force light UI */
}

/* Full-page layout: footer always at bottom, grows with content */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* Thin accent stripe */
.brandbar { height: 6px; background: var(--accent); }

/* Full-width header — height driven by padding, not fixed px */
.site-header {
  background: var(--accent);
  display: flex;
  align-items: center;
}
.site-header__inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 24px;   /* 18px top/bottom gives logo room to breathe */
  display: flex;
  align-items: center;
}
.site-logo {
  display: block;
  height: 55px;
  width: auto;
}

/* Footer bar — sticks to bottom on short pages, flows naturally on long ones */
.site-footer {
  background: var(--accent);
  color: #fff;
  /* no margin-top needed; flex layout on body handles spacing */
}
.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  text-align: center;
}

/* App container — flex: 1 makes it fill remaining space, pushing footer down */
.container {
  max-width: 1200px;
  flex: 1;
}

/* Title spacing (40px gap before instructions) */
.title-block { margin: 18px 0 40px; }

/* Instructions (growable) */
.instructions {
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, #000);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

/* ===== Inline form overrides (beat Pico) ===== */
form.inline-form {
  display: flex !important;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}
form.inline-form input[list],
form.inline-form input[type="number"] {
  width: auto !important;
  max-width: 160px !important;
  flex: 0 0 auto !important;
}
form.inline-form button[type="submit"] {
  width: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important; /* intentionally no extra padding */
}

/* Table in main (dark line style kept for build view) */
.table-wrap { overflow-x: auto; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .55rem; border-bottom: 1px solid #2c2f36; }
td.num { text-align: right; }
td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
td.nowrap { white-space: nowrap; }

/* Done button row aligned right */
.actions { display: flex; justify-content: flex-end; margin-top: 1rem; }

/* Modal sizing (HARD FLOOR at 1020px) */
dialog article.wide {
  max-width: 1020px;   /* do not reduce below this */
  width: 90vw;
}
.summary-table th, .summary-table td {
  border-bottom: 1px solid #2c2f36;
  padding: .45rem .6rem;
}
.meta { opacity: .7; font-size: .9rem; margin-top: -.25rem; }
.modal-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ===== Business View (final page) ===== */
body.business { background: #f7f8fa; }
body.business .brandbar { background: var(--accent); }
body.business .site-footer { background: var(--accent); color: #fff; }

.biz-card {
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 12px;
  padding: 20px;
  margin-top: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
.biz-card h1 { margin: 0 0 6px; font-size: 1.35rem; color: #111; }
.biz-meta { margin: 0 0 14px; color: #0a7a33; font-weight: 600; }

/* Light Business Summary Table (override Pico dark table) */
.biz-summary {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  background: #ffffff !important;
}
.biz-summary th,
.biz-summary td {
  background: #ffffff !important;
  color: #222 !important;
  border: 1px solid #e0e0e0 !important;
  padding: 8px 10px;
  font-size: 0.9rem;
}
.biz-summary th {
  background: #f9f9f9 !important;
  font-weight: 600;
  color: #111 !important;
}
.biz-summary tr:hover td {
  background: #f3f3f3 !important;
}
.biz-summary td.num { text-align: right; }
.biz-summary td.mono { font-family: ui-monospace, Menlo, monospace; }
.biz-summary td.nowrap { white-space: nowrap; }

/* Biz actions (right-aligned controls) */
.biz-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Public URL block */
.biz-link { display: grid; gap: 6px; max-width: 720px; }
.biz-link label { font-weight: 600; color: #222; }
.biz-link input {
  color: #222;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 8px;
  padding: .5rem .6rem;
  opacity: 1;
}

/* Print cleanup */
@media print {
  .inline-form, .instructions, .actions, dialog { display: none !important; }
  body.business { background: #fff; }
  .biz-card { box-shadow: none; border: none; }
}
