/*
  Shared plain-CSS styling for the public intake wizard. Reuses the same
  CSS-custom-property theme sets as the campaign pages (static/campaigns/
  theme.css) so the intake form and the family's eventual page feel like
  one continuous experience, without pulling in campaign-page-specific
  layout rules (hero, sensitive photo, timeline, etc.) that don't apply
  here. No JS framework, no build step, per the plan.
*/

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-1, #eaf3f8);
  color: #333;
  line-height: 1.6;
  /* Keep the ARF footer at the bottom of short pages. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > .arf-site-footer {
  margin-top: auto; /* beats brand.css's fixed margin, which loads later */
}

.resume-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-color, #5f8bb8);
}

.intake-wrap {
  width: 100%;
  box-sizing: border-box;
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.intake-header {
  text-align: center;
  margin-bottom: 24px;
}

.intake-header h1 {
  font-family: 'League Spartan', 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--heading-color, #446b93);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

/* ARF's own words, in the brand's handwritten accent face (Caveat stands
   in for Linotype Felt Pen; see fonts.css). Used once, sparingly. */
.arf-promise {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--heading-color, #446b93);
  text-align: center;
  margin: 8px 0 24px;
}

.intake-header p {
  color: var(--muted-color, #5f8bb8);
  margin-top: 0;
}

.progress {
  display: flex;
  gap: 6px;
  margin: 24px 0 32px;
}

.progress-step {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-3, #c3d9ea);
}

.progress-step.done,
.progress-step.current {
  background: var(--accent, #3182b6);
}

.progress-label {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-color, #5f8bb8);
  margin-bottom: 8px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.card h2 {
  font-family: 'League Spartan', 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--heading-color, #446b93);
  margin-top: 0;
}

.reassurance {
  background: var(--accent-pale, #eaf3f8);
  border-left: 3px solid var(--accent, #3182b6);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--muted-color, #5f8bb8);
  margin-bottom: 20px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.field .help-text {
  font-size: 0.85rem;
  color: #777;
  margin-top: 4px;
}

.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=date],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.field .errorlist {
  color: #b0263a;
  font-size: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}

.radio-options label {
  display: block;
  font-weight: 400;
  margin-bottom: 6px;
}

.radio-options input[type=radio] {
  margin-right: 8px;
}

/* Color swatches keep their own layout inside .radio-options, which would
   otherwise turn each swatch into a plain block label. */
.radio-options .swatch-option {
  display: flex;
  margin-bottom: 0;
  font-weight: 400;
}

.radio-options .swatch-option input[type=radio] {
  margin-right: 0;
}

.checkbox-field label {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Honeypot: visually hidden but present in the DOM/tab order removed —
   a naive bot that fills every input (rather than only visible-looking
   ones) still triggers it, unlike a plain `display:none` a smarter bot
   might special-case. */
.hp-field-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  overflow: hidden;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 24px;
  border: none;
  background: var(--accent, #3182b6);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--accent-dark, #246188); }

.btn-secondary {
  background: #fff;
  color: var(--accent, #3182b6);
  border: 1px solid var(--accent, #3182b6);
}

.resume-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted-color, #5f8bb8);
  background: var(--accent-pale, #eaf3f8);
  border-radius: 8px;
  padding: 12px 14px;
}

/* Only the link itself may break anywhere; the sentence wraps at words. */
#resume-url-text {
  overflow-wrap: anywhere;
}

.char-count { font-size: 0.85rem; color: var(--muted-color, #5f8bb8); margin: 4px 0 0; }
.char-count.over { color: #8a4b2a; }

.step-message {
  background: var(--accent-pale, #eaf3f8);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 16px;
}

.copy-link-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
}

.confirmation-message p {
  margin: 0 0 0.7em;
  line-height: 1.55;
}

.confirmation-message p:last-child {
  margin-bottom: 0;
}

.confirmation-extras {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--accent-pale, #eaf3f8);
}

.confirmation-extras .muted { margin: 0 0 12px; }

.confirmation-invite {
  background: #fff4f7;
  border-radius: 12px;
  padding: 18px 18px 20px;
  margin-top: 22px;
  text-align: center;
}

.confirmation-invite p { margin: 0 0 14px; line-height: 1.55; }

.muted {
  color: var(--muted-color, #5f8bb8);
  font-size: 0.9rem;
}

.org-resource-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Photos step */
.photo-guidance { margin-bottom: 18px; }
/* Each gallery photo is one fixed-width tile; its controls fit inside that
   width so the grid lines up. */
.photo-current { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px 12px 10px 0; }
.photo-gallery-current .photo-current { display: flex; align-items: stretch; margin: 0; min-width: 0; }
.photo-gallery-current .photo-thumb { display: block; width: 100%; height: 110px; max-width: none; box-sizing: border-box; }
.photo-thumb { height: 110px; max-width: 180px; object-fit: cover; border-radius: 8px; border: 1px solid #d7e7f1; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.photo-previews:empty { display: none; }
.photo-tile { display: flex; align-items: center; justify-content: center; height: 110px; width: 140px; padding: 8px; box-sizing: border-box; text-align: center; font-size: 0.85rem; word-break: break-all; border-radius: 8px; border: 1px dashed #b9d3e3; background: #f4f9fc; color: #4a6a7c; }
.photo-remove { font-weight: normal; font-size: 0.9rem; }
.photo-gallery-current {
  display: grid; grid-template-columns: repeat(auto-fill, 140px); gap: 12px;
  list-style: none; padding: 0; margin: 4px 0 12px;
}
/* Phones: two photos per row, each half the width. */
@media (max-width: 480px) {
  .photo-gallery-current { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Gallery photos: a number on each, in page order, an x to remove it, and
   arrows to move it, all inside the photo's own width. */
.photo-numbered { position: relative; }
.photo-number {
  position: absolute; top: 6px; left: 6px; min-width: 26px; height: 26px; padding: 0 6px;
  box-sizing: border-box; border-radius: 13px; background: var(--accent, #3182b6); color: #fff;
  font-weight: 700; font-size: 0.9rem; line-height: 26px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.photo-order-actions { display: flex; gap: 6px; }
.photo-btn {
  flex: 1; min-width: 0; height: 32px; padding: 0; border-radius: 16px;
  border: 1px solid var(--accent, #3182b6); background: #fff; color: var(--accent, #3182b6);
  font-size: 1rem; line-height: 1; cursor: pointer;
}
.photo-btn:hover:not(:disabled), .photo-btn:focus-visible { background: var(--accent-pale, #eaf3f8); }
.photo-btn:disabled { opacity: 0.3; cursor: default; }
/* Remove: a small round x in the photo's top-right corner. */
.photo-remove-x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0;
  border-radius: 50%; border: 1px solid #c9d6de; background: rgba(255, 255, 255, 0.95);
  color: #5a6b75; font-size: 1.2rem; line-height: 26px; text-align: center; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.photo-remove-x:hover, .photo-remove-x:focus-visible { background: #fdecec; border-color: #c0392b; color: #c0392b; }
.photo-remove-x:disabled { opacity: 0.5; cursor: default; }
/* Fingers need a bigger target than a mouse pointer. */
@media (pointer: coarse) {
  .photo-remove-x { width: 34px; height: 34px; line-height: 32px; font-size: 1.35rem; }
  .photo-btn { height: 36px; border-radius: 18px; }
}
/* Dragging on a computer (the arrows stay for phones and keyboards). */
.photo-current.is-draggable .photo-thumb { cursor: grab; }
.photo-current.is-dragging { opacity: 0.4; }
.photo-current.drop-before .photo-numbered { box-shadow: -4px 0 0 var(--accent, #3182b6); border-radius: 8px; }
.photo-current.drop-after .photo-numbered { box-shadow: 4px 0 0 var(--accent, #3182b6); border-radius: 8px; }
.photo-message { margin: 6px 0 10px; }
.photo-field input[type=file] { display: block; margin-top: 6px; max-width: 100%; }
