/* A camp's page and sign-up form (src/camp.ts): the tournaments' page styles
   (tournament.css) in the camps' colour — amber between orange and brown
   (docs/CAMPS.md, the owner's choice), a lighter amber in the dark theme —
   and the few parts only a camp has. Made for a parent's phone first
   (390 px): one centred column, one card per step, no boxes inside boxes,
   shifts and extras as large rows to tap, the price under the step (never
   over the choices). */
:root {
  --a: #b45309;
  --a-deep: #78350f;
  --a-ink: #b45309;
  --a-soft: #fef3c7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --a-ink: #f59e0b;
    --a-soft: #2b1d08;
  }
}
/* One column, centred: the header lines up with the form. */
.cp .tp-wrap { max-width: 592px; }
.cp .tp-hero .tp-register-button:hover { background: #fef3c7; }
.cp-description { white-space: pre-line; margin: 0 0 16px; }

/* What the form does not say: the lowest price and how it is paid; the discounts folded. */
.cp-info { display: grid; gap: 4px; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.cp-info p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cp-info .cp-info-price { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.cp-info .cp-info-early { color: var(--a-deep, #92400e); font-weight: 600; }
.cp-details { margin: 0 0 20px; }
.cp-details ul { margin: 8px 0 4px; padding-left: 20px; }
.cp-signup-title { margin: 20px 0 10px; font-size: 1.25rem; }

/* The form: a single card; inside it plain headings and space, no frames. */
.cp .tp-form { max-width: none; gap: 20px; padding: 20px 16px; }
.cp-set { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
.cp-set legend { font-weight: 700; font-size: 1.05rem; padding: 0; margin: 0 0 10px; }
.cp-question { display: grid; gap: 6px; font-size: 0.95rem; font-weight: 600; }
.cp-yesno { display: flex; gap: 20px; font-weight: 400; }
.cp-yesno label { display: flex; align-items: center; gap: 6px; }
.cp-step { display: grid; gap: 28px; }
.cp-step[hidden] { display: none; }
.cp-note { color: var(--muted); font-style: normal; font-size: 0.875rem; }

/* The step indicator: three equal columns, the number over a short label, readable on a phone. */
.cp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.25; text-align: center; }
.cp-steps li { display: grid; justify-items: center; gap: 4px; padding-top: 8px; border-top: 3px solid var(--line); }
.cp-steps li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); font-size: 0.85rem; font-weight: 700; }
.cp-steps li[aria-current="step"] { color: var(--text); font-weight: 700; border-top-color: var(--a); }
.cp-steps li[aria-current="step"] span { background: var(--a); color: #fff; }

/* A shift or an extra: the whole row taps; the name and days on the left, the price on the right. */
.cp .tp-form .cp-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 400;
  cursor: pointer;
}
.cp-option input { width: 20px; height: 20px; margin: 0; accent-color: var(--a); }
.cp-option:has(input:checked) { border-color: var(--a); background: var(--a-soft); }
.cp-option:has(input:focus-visible) { outline: 3px solid var(--a-ink); outline-offset: 2px; }
.cp-option-text { display: grid; gap: 2px; min-width: 0; }
.cp-option-name { font-weight: 600; }
.cp-option-sub { color: var(--muted); font-size: 0.9rem; }
.cp-option-price { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cp-option-full .cp-note { color: var(--warn-ink); }
/* Sold whole: the one line, already chosen (its box hidden), not a thing to tap. */
.cp .tp-form .cp-option-fixed { grid-template-columns: minmax(0, 1fr) auto; cursor: default; border-color: var(--a); background: var(--a-soft); }
/* Sold by days: week by week, a box per day, as many in a row as fit. */
.cp-week { display: grid; gap: 6px; }
.cp-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.cp .tp-form .cp-day {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.cp-day input { width: 20px; height: 20px; margin: 0; accent-color: var(--a); }
.cp-day:has(input:checked) { border-color: var(--a); background: var(--a-soft); }
.cp-day:has(input:focus-visible) { outline: 3px solid var(--a-ink); outline-offset: 2px; }
.cp-day .cp-note { font-size: 0.75rem; font-weight: 400; }
/* A camp for children and adults: the wording the date of birth does not ask for stays out. */
[data-for][hidden] { display: none !important; }

/* The date of birth in three lists: day narrow, month wide, year. */
.cp-dob { border: 0; padding: 0; margin: 0; min-width: 0; }
.cp-dob legend { font-size: 0.95rem; font-weight: 600; padding: 0; margin: 0 0 4px; }
.cp-dob-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 9fr) minmax(0, 6fr); gap: 8px; }
.cp .tp-form .cp-dob-row select { padding-left: 8px; padding-right: 4px; }

.cp-pickup { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 8px 0; }
.cp-pickup:first-child { padding-top: 0; }
.cp-link { background: none; border: 0; padding: 8px 0; color: var(--a-ink); font: inherit; font-weight: 600; cursor: pointer; justify-self: start; }
.cp-link:hover { text-decoration: underline; }
.cp-more summary { cursor: pointer; color: var(--a-ink); font-weight: 600; padding: 4px 0; }
.cp-more[open] { display: grid; gap: 12px; }

/* The price: under the step, in the flow (it never covers a choice). */
.cp-price dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.cp-price dt, .cp-price dd { margin: 0; }
.cp-price dd { text-align: right; font-variant-numeric: tabular-nums; }
.cp-price .cp-total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 4px; }
.cp-price .tp-form-note { margin: 0; }

/* One clear button per step; on a phone it takes the whole width, «Back» under it. */
.cp-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cp-nav [data-back] { margin-right: auto; }
.cp-nav button[hidden] { display: none; }
.cp .tp-form .cp-nav .tp-register-button { min-height: 48px; padding: 12px 22px; font-size: 1rem; }
@media (max-width: 559px) {
  .cp-nav { flex-direction: column-reverse; align-items: stretch; }
  .cp-nav [data-back] { margin: 0; align-self: center; }
  .cp .tp-form .cp-nav .tp-register-button { width: 100%; }
}
.cp-sample { display: inline-block; margin: 6px 0 0; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-weight: 600; }

/* The cover photo behind the header (the site's .hero.photo, styles.css): a dark overlay keeps the text readable, the photo fades into the page. */
/* Not clipped: the language menu opens out of the header; the photo is clipped by its own box (.cp-bg). */
.cp-photo { position: relative; isolation: isolate; overflow: visible; background: none; padding: 20px 0 72px; }
.cp-photo .cp-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); }
.cp-photo .cp-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.cp-photo .cp-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 8, 16, 0.72) 0%, rgba(4, 8, 16, 0.5) 60%, rgba(4, 8, 16, 0.3) 100%); }
.cp-photo h1, .cp-photo .tp-meta, .cp-photo .tp-org { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45); }
@media (max-width: 640px) { .cp-photo .cp-bg::after { background: rgba(4, 8, 16, 0.62); } }

/* «Мій запис» — a family's own page (src/camp-family.ts): one card per child, the money as a short list,
   the family's form folded under it. */
.cf-child { margin: 0 0 16px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; gap: 10px; }
.cf-child h2 { margin: 0; font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cf-badge { font-size: 0.8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.cf-badge.cf-accepted { background: #dcfce7; color: #166534; }
.cf-badge.cf-pending { background: var(--a-soft); color: var(--a-ink); }
.cf-badge.cf-cancelled { background: #fee2e2; color: #991b1b; }
.cf-facts, .cf-money { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.cf-facts dt, .cf-money dt { color: var(--muted); }
.cf-facts dd, .cf-money dd { margin: 0; }
.cf-money dd { text-align: right; font-variant-numeric: tabular-nums; }
.cf-money .cf-ok { color: #15803d; font-weight: 600; }
.cf-money .cf-late { color: #b91c1c; font-weight: 600; }
.cf-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 0.95rem; }
.cf-parts li { display: flex; justify-content: space-between; gap: 12px; }
.cf-parts .cf-part-paid { color: var(--muted); }
.cf-parts .cf-part-overdue { color: #b91c1c; font-weight: 600; }
.cf-pay .tp-register-button { width: 100%; }
.cf-label { margin: 0; color: var(--muted); }
.cf-receipts ul { margin: 4px 0 0; padding-left: 18px; }
.cf-pass { color: var(--a-ink); font-weight: 600; }
.cf-pickup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 420px) { .cf-pickup { grid-template-columns: 1fr; } }
.cf-private { margin-top: 8px; }
/* «Документи» (docs/CAMPS.md «Документи родини»): each document there or missing, the family's files, the upload. */
.cf-docs { display: grid; gap: 6px; }
.cf-doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cf-doc .cf-ok { color: #15803d; font-weight: 600; }
.cf-doc .cf-late { color: #b91c1c; font-weight: 600; }
.cf-doc-files { margin: 2px 0 0; padding-left: 18px; }
.cf-doc-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cf-doc-remove { display: inline; margin: 0; }
.cf-doc-remove button { border: 0; background: none; padding: 0; color: #b91c1c; font: inherit; font-size: 0.9rem; text-decoration: underline; cursor: pointer; }
.cf-doc-form input[type=file] { display: block; width: 100%; margin-top: 4px; }
.cf-warning { margin: 4px 0; padding: 8px 10px; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 0.9em; }
.cp-notice ul { margin: 6px 0 0; padding-left: 1.1em; }
.cp-notice li { margin: 2px 0; }

/* Brothers and sisters in one form (docs/CAMPS.md «Кілька дітей однією формою»): each added child's block under a line,
   its name in the title with «Remove» beside it; after sending, one line per child. */
.cp-child { display: grid; gap: 16px; }
.cp-child-more { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.cp-child-more legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cp-child-more legend .cp-link { padding: 0; font-size: 0.95rem; font-weight: 500; }
.cp-add-child { padding: 10px 0; }
[data-child-health] { display: grid; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.cp-done-children { margin: 8px 0 12px; padding-left: 18px; display: grid; gap: 6px; }
.cp-done-children .cp-link { padding: 0; }
/* «Send me the link again»: folded under the form. */
.cp-link-again { margin-top: 24px; }
.cp-link-form { max-width: 560px; }

/* «Фото й новини дня» on the family's page (src/camp-family.ts postsBlock). */
.cf-post { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.cf-post:first-of-type { border-top: 0; }
.cf-post-text { white-space: pre-line; margin: 0.25rem 0 0.5rem; }
.cf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.5rem; }
.cf-photos img { width: 100%; height: 7rem; object-fit: cover; border-radius: var(--radius); display: block; }

/* «Умови скасування» (docs/CAMPS.md): the rules as a short list; the family's «cancel» folded under the child. */
.cp-cancel ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.cf-cancel { margin-top: .75rem; }
