/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --text: #1f2933;
  --muted: #616e7c;
  --border: #d9e2ec;
  --bg: #f5f7fa;
  --accent: #2563eb;
  --red: #d64545;
  --orange: #f0883e;
  --yellow: #f2c94c;
  --green: #3f9c5a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container { max-width: 860px; margin: 0 auto; padding: 32px 16px 64px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }
h3 { margin-top: 24px; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.muted { color: var(--muted); margin-top: 0; }
.page-header { margin-bottom: 24px; }

.step, .panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.step[hidden], .panel[hidden] { display: none; }
.prompt { font-style: italic; }

.progress { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.progress li { flex: 1; padding-top: 8px; border-top: 4px solid var(--border); color: var(--muted); font-size: .875rem; }
.progress li.done { border-color: var(--green); }
.progress li.current { border-color: var(--accent); color: var(--text); font-weight: 600; }

.alert { background: #fde8e8; border: 1px solid var(--red); border-radius: 8px; padding: 12px 16px; }

.question { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin: 0 0 16px; }
.question.invalid { border-color: var(--red); }
.question legend { padding: 0 4px; }
.qnum { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 4px; }

.options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.option { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); background: #eff4ff; }

.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.button { font: inherit; border: 0; border-radius: 8px; padding: 10px 20px; background: var(--accent); color: #fff; cursor: pointer; }
.button.secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: -1px; }
.tabs button { font: inherit; background: none; border: 1px solid transparent; border-radius: 8px 8px 0 0; padding: 10px 16px; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; border-color: var(--border); border-bottom-color: #fff; color: var(--text); font-weight: 600; }
.tabs + .panel, .tabs ~ .panel { border-top-left-radius: 0; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; padding: 0; margin: 16px 0; font-size: .875rem; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; }

.bar-row { margin-bottom: 20px; }
.bar-label { margin: 0 0 6px; font-size: .9375rem; }
.bar { display: flex; height: 32px; border-radius: 6px; overflow: hidden; background: var(--border); }
.segment { display: flex; align-items: center; justify-content: center; font-size: .8125rem; font-weight: 600; color: #fff; white-space: nowrap; }
.segment.yellow { color: var(--text); }

.red { background: var(--red); }
.orange { background: var(--orange); }
.yellow { background: var(--yellow); }
.green { background: var(--green); }

.qr { text-align: center; }
.qr-code { display: block; width: min(80vw, 70vh); height: auto; margin: 24px auto; background: #fff; padding: 24px; border-radius: 12px; }
.qr-url { font-size: 1.25rem; font-weight: 600; word-break: break-all; }

.data-export { max-width: 420px; margin: 0 auto; }
.data-export form { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.data-export input[type="password"] { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.data-export .button { align-self: flex-start; margin-top: 8px; }
.alert { color: var(--red); font-weight: 600; }
