/*
 * Styles of the scanner page: plain and high contrast, for one thumb in portrait.
 * Text at least 20 px, buttons at least 56 px high and full width; the card's colour is the outcome.
 */

:root {
  --text: #111111;
  --background: #ffffff;
  --muted: #555555;
  --line: #cccccc;
  --primary: #1a4fd6;
  --green: #0f7b3a;
  --amber: #b85c00;
  --red: #b3141b;
  --grey: #5f6368;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 20px;
  line-height: 1.35;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}

[hidden] {
  display: none !important;
}

h1 {
  font-size: 32px;
  margin: 24px 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

input {
  width: 100%;
  min-height: 56px;
  font-size: 24px;
  padding: 8px 12px;
  border: 2px solid var(--text);
  border-radius: 8px;
  margin-bottom: 16px;
}

button {
  font: inherit;
}

.primary {
  display: block;
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
}

.primary:disabled {
  opacity: 0.5;
}

.link {
  border: 0;
  background: none;
  color: var(--primary);
  text-decoration: underline;
  min-height: 44px;
  padding: 0 4px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--line);
  margin-bottom: 12px;
}

.tab {
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 4px solid var(--text);
}

.warning {
  color: var(--red);
  font-weight: 700;
}

.card {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  color: #ffffff;
  background: var(--grey);
}

.card.checking {
  color: var(--text);
  background: #eeeeee;
}

.card.green {
  background: var(--green);
}

.card.amber {
  background: var(--amber);
}

.card.red {
  background: var(--red);
}

.card-name {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.card-message {
  font-size: 22px;
  margin: 0;
}

.card .primary {
  margin-top: 16px;
  background: #ffffff;
  color: var(--text);
}

.reader {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
}
