/*
 * 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 {
  --ink: #1e2933;
  --muted: #64748b;
  --accent: #2563eb;
  --paper: #f8fafc;
  --line: #e2e8f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

main { max-width: 640px; margin: 0 auto; padding: 1rem; }

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: white;
  border-bottom: 1px solid var(--line);
}
.site-nav .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.site-nav .nav-links { display: flex; gap: 0.9rem; align-items: center; }
.site-nav a { color: var(--accent); text-decoration: none; }

.flash { max-width: 640px; margin: 0.8rem auto 0; padding: 0.6rem 1rem; border-radius: 8px; }
.flash.notice { background: #dcfce7; color: #14532d; }
.flash.alert { background: #fee2e2; color: #7f1d1d; }

h1 { font-size: 1.5rem; line-height: 1.3; }
.fillin-meta { color: var(--muted); font-size: 0.9rem; }
.hint { color: var(--muted); font-size: 0.9rem; }

.fillin-body {
  white-space: pre-wrap;
  font-size: 1.1rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}
.blank { white-space: nowrap; }
.blank input {
  font-size: 1rem;
  padding: 0.15rem 0.4rem;
  border: none;
  border-bottom: 2px solid var(--accent);
  background: #eff6ff;
  border-radius: 4px 4px 0 0;
  max-width: 11rem;
}
.blank input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.blank .reveal {
  border: none; background: none; cursor: pointer; padding: 0 0.15rem; font-size: 0.95rem;
}
.blank .answer { color: #15803d; font-weight: 600; margin-left: 0.15rem; }

.fillin-actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
button, input[type="submit"] {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
}
button.primary, input[type="submit"] { background: var(--accent); color: white; border-color: var(--accent); }
.link-button { border: none; background: none; color: var(--accent); padding: 0; font-size: inherit; cursor: pointer; }

.save-list { list-style: none; padding: 0; }
.save-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.save-list .fillin-meta { display: block; }

.errors { background: #fee2e2; color: #7f1d1d; border-radius: 8px; padding: 0.5rem 1rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], textarea {
  font-size: 1rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 100%;
  max-width: 26rem;
  font-family: inherit;
}
textarea { max-width: 100%; }

.qr-preview { max-width: 220px; border: 1px solid var(--line); border-radius: 8px; }
.preview mark { background: #fef08a; padding: 0 0.2rem; border-radius: 3px; }

/* Keep inline blanks sized to their content, overriding the generic full-width inputs above. */
.blank input[type="text"] { width: auto; max-width: 11rem; }
