/* Layout & app-specific styling. DoodleCSS (doodle.css) provides the
   hand-drawn look for buttons, inputs, selects, borders and the base
   paper palette (#FDF7F1 background, #3c3c3c ink). We only add layout and
   a couple of accent colors here. */

:root {
  --ink: #3c3c3c;
  --muted: #8a8178;
  --red: #c0392b;
  --green: #2a7d5f;
  --paper-2: #fffdf9;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

/* Person names render in a clean sans-serif, not the doodle font. */
.chips li > span,
#excl-person,
.checklist label span,
.assignments .giver,
.assignments .receiver {
  font-family: var(--sans);
}

* { box-sizing: border-box; }

/* Material Icons: align with adjacent text, inherit sizing sensibly. */
.material-icons {
  font-size: 1.2em;
  line-height: 1;
  vertical-align: -0.25em;
}
button .material-icons { margin-right: 0.15em; }
h1 .material-icons { font-size: 0.9em; vertical-align: -0.1em; color: var(--red); }
.assignments .material-icons { color: var(--green); }

body { line-height: 1.5; }

header {
  text-align: center;
  padding: 2rem 1rem 0.5rem;
}
h1 {
  margin: 0;
  font-family: "Berkshire Swash", cursive;
  font-size: 2.8rem;
  color: var(--red);
}
.tagline { color: var(--muted); margin: 0.5rem 0 0; }

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1.5rem;
}

.card { padding: 1.25rem 1.5rem 1.5rem; }
.card h2 { margin: 0 0 0.75rem; }
.subtle { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.row input[type="text"],
.row select { flex: 1 1 160px; min-width: 0; }

.hint { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0; }
.error {
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin: 0.75rem 0 0;
}

/* People chips */
.chips {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.2rem 0.3rem 0.2rem 0.8rem;
}
.chips .remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.3rem;
  cursor: pointer;
  min-height: 0;
}
.chips .remove:hover { color: var(--red); }

/* Exclusion checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}
.checklist li { margin: 0; }
.checklist label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  margin: 0;
}
.checklist input[type="checkbox"] { cursor: pointer; margin: 0; }
.checklist li.checked label {
  border-color: var(--red);
  background: #fbeae7;
  color: var(--red);
}

/* Draw */
#draw-btn { width: 100%; font-size: 1.25rem; }

/* Results */
.results { margin-top: 1.25rem; }
.results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.results-head h3 { margin: 0; }
.results-actions { display: flex; gap: 0.5rem; }

.assignments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}
.assignments li {
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.assignments .giver { font-weight: 700; }
.assignments .receiver {
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.assignments .receiver.hidden-name {
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

footer { text-align: center; padding: 1.5rem; color: var(--muted); }
