/* Shining Star auction.
 *
 * Brand values in one place. Palette sampled from the school's watercolour
 * star logo (coral → sunshine, raspberry lettering) and the teal accent of
 * shiningstarwaldorf.com. Headings in EB Garamond, the free cousin of the
 * school site's Adobe Garamond; body text in the system sans for legibility
 * on phones.
 */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --coral: #e45845;
  --peach: #f9936d;
  --sun: #ffe87b;
  --raspberry: #c2386a;
  --raspberry-dark: #9c2a54;
  --teal: #3cb7ac;
  --teal-dark: #23897f;
  --ink: #1f1a1c;
  --ink-soft: #5b5257;
  --paper: #fffaf3;
  --card: #ffffff;
  --line: #eadfd3;
  --ok: #2f7d4f;
  --warn: #a5620b;
  --bad: #b3261e;

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 var(--sans);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--raspberry);
}
h1 { font-size: 2rem; margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.2rem; margin: 1rem 0 .25rem; }

a { color: var(--teal-dark); }
a:hover { color: var(--raspberry); }

.muted { color: var(--ink-soft); font-size: .9rem; }

/* ---------------------------------------------------------------- header */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  background: var(--card);
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--coral), var(--peach), var(--sun)) 1;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-school { font: 600 1.05rem var(--serif); color: var(--raspberry); }
.brand-event { font-size: .8rem; color: var(--ink-soft); }

.nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: .95rem; }
/* Who is signed in, so a donor who followed someone else's link can see it. */
.who { color: var(--ink-soft); font-size: .85rem; overflow-wrap: anywhere; }
.nav a { text-decoration: none; }
.inline { display: inline; margin: 0; }

/* ------------------------------------------------------------------ page */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}

.hero { padding: 8px 0 16px; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }

.steps ol { padding-left: 1.25rem; }
.steps li { margin-bottom: .6rem; }

.foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

/* ----------------------------------------------------------------- forms */

label { display: block; font-weight: 600; margin: 14px 0 4px; }
.hint { display: block; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%;
  font: inherit;
  /* 16px+ stops iOS zooming into the field. */
  font-size: 17px;
  padding: 10px 12px;
  border: 1px solid #cfc3b6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 7rem; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid color-mix(in srgb, var(--teal) 45%, transparent);
  border-color: var(--teal);
}
input.code {
  font-size: 1.6rem;
  letter-spacing: .4em;
  text-align: center;
  max-width: 12rem;
}

.button, button:not(.link) {
  display: inline-block;
  font: 600 1rem var(--sans);
  padding: 12px 20px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--raspberry);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, button:not(.link):hover { background: var(--raspberry-dark); color: #fff; }
.button.secondary, button.secondary { background: var(--teal-dark); }
button.link {
  background: none; border: 0; padding: 0;
  font: inherit; color: var(--teal-dark); cursor: pointer;
}

.flash { padding: 12px 14px; border-radius: 8px; margin: 12px 0; }
.flash.error { background: #fdecea; color: var(--bad); }
.flash.ok { background: #e8f5ec; color: var(--ok); }

@media (min-width: 640px) {
  h1 { font-size: 2.4rem; }
  .brand-school { font-size: 1.25rem; }
}

/* ------------------------------------------------------- donation forms */

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.choices { margin-top: 14px; }
legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
label.choice {
  display: flex; gap: 10px; align-items: flex-start;
  font-weight: 400; margin: 6px 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
label.choice input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.checkgrid { display: grid; grid-template-columns: 1fr; gap: 0 10px; }
.field-error { display: block; color: var(--bad); font-weight: 600; font-size: .9rem; }
textarea.short { min-height: 4rem; }
.row2, .row3 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
.section { margin-top: 8px; }
.section[hidden], [data-show-when][hidden] { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.donation-form > fieldset[disabled] { opacity: .75; }

.photos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos li { text-align: center; font-size: .85rem; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.item-list { list-style: none; padding: 0; }
.item a { display: flex; gap: 10px; align-items: baseline; text-decoration: none; color: var(--ink); }
.item-id { font: 600 .9rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--teal-dark); }
.item-title { font-weight: 600; }
.item .muted { display: block; margin-top: 4px; }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--line); }
.tag.warn { background: #fdf0d5; color: var(--warn); }

/* ---------------------------------------------------------------- team */

.wide { max-width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters input[type=search], .filters select { width: auto; flex: 1 1 160px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.grid { border-collapse: collapse; width: 100%; font-size: .9rem; }
.grid th, .grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid th { position: sticky; top: 0; background: #fbf4ea; font-weight: 600; white-space: nowrap; }
.grid td.num { text-align: right; white-space: nowrap; }
.grid td.id { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.grid form { margin: 0; }
.grid .cell { font-size: .9rem; padding: 4px 6px; min-width: 7rem; }
.cell-check input { width: 20px; height: 20px; }
.htmx-request { opacity: .5; }

.pick { list-style: none; padding: 0; }
.pick li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }

@media (min-width: 640px) {
  .checkgrid { grid-template-columns: 1fr 1fr; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .row3 { grid-template-columns: 2fr 1fr 1fr; }
  .row3.zip-first { grid-template-columns: 1fr 2fr 1fr; }
  .photos { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .page:has(.wide) { max-width: 1400px; }
}

.zip-status { min-height: 1.2em; margin: 4px 0 0; }
.credit { font-size: .8rem; }

/* Address suggestions (combobox). */
.combo { position: relative; }
.suggestions {
  position: absolute; z-index: 10; left: 0; right: 0; top: 100%;
  margin: 2px 0 0; padding: 4px 0; list-style: none;
  background: #fff; border: 1px solid #cfc3b6; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(31, 26, 28, .12);
  max-height: 60vh; overflow-y: auto;
}
.suggestions li { padding: 10px 12px; cursor: pointer; line-height: 1.3; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: color-mix(in srgb, var(--teal) 15%, #fff); }
.privacy { margin: 4px 0 6px; }
