/* A new DSP getting set up from their phone: the "Finish getting set up" list
   on the home page, and its pages — Send a photo of your ID, Agreements and
   reading one, Emergency contacts and adding one. Phone first; on a computer
   the same single column, centred. */
:root {
  --setup-ink: #1f313b;
  --setup-soft-ink: #4c5a62;
  --setup-muted: #79848a;
  --setup-green: #2e7d52;
  --setup-line: #e7e1d6;
  --setup-tint: #f1ece4;
  --setup-card: #fefbf7;
  --setup-amber: #8a5a0f;
  --setup-amber-tint: #fbf3e2;
}

/* ── Home: Finish getting set up ─────────────────────────────────────── */

.finish-setup {
  width: 100%;
  max-width: 40rem;
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--setup-card);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  color: var(--setup-ink);
  text-align: left;

  @media (min-width: 768px) { padding: 1.5rem 1.75rem 1.75rem; }
}
.finish-setup__title {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}
.finish-setup__intro {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--setup-soft-ink);
}
.finish-setup__steps { display: flex; flex-direction: column; }
.setup-step {
  border-bottom: 1px solid var(--setup-line);

  &:last-child { border-bottom: 0; }
}
.setup-step__row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0;
  font-size: 1rem;
  line-height: 1.35;
}
.setup-step__link:hover .setup-step__label { text-decoration: underline; }
.setup-step__label { flex: 1; min-width: 0; }
.setup-step--done .setup-step__label { color: var(--setup-muted); }
.finish-setup__note {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  background: var(--setup-tint);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--setup-soft-ink);
}

/* A step's circle, and the chevron on a row that opens a page. */
.setup-circle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid var(--setup-line);
  border-radius: 9999px;
  background: #fff;

  svg { width: 1rem; height: 1rem; }
}
.setup-circle--done {
  border-color: var(--setup-green);
  background: var(--setup-green);
  color: #fff;
}
.setup-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  color: var(--setup-muted);
}

/* ── The setup pages ─────────────────────────────────────────────────── */

.setup-page { color: var(--setup-ink); }
.setup-back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 1rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--setup-green);

  svg { width: 1.125rem; height: 1.125rem; }
  &:hover { text-decoration: underline; }
}
.setup-page__title {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;

  @media (min-width: 768px) { font-size: 2rem; }
}
.setup-page__lead {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--setup-soft-ink);
}
.setup-page__meta {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: var(--setup-muted);
}
.setup-page__outline { margin-top: 1rem; background: #fff; }

/* A cream card: the page's content, a list, or a form. */
.setup-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--setup-card);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);

  & + .setup-card { margin-top: 1rem; }

  @media (min-width: 768px) { padding: 1.5rem; }
}
.setup-card--list { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.setup-card__fine {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--setup-soft-ink);
}
.setup-card__empty { padding: 0.875rem 0; color: var(--setup-soft-ink); }

/* Rows with a circle, a title, a second line and a chevron. */
.setup-list {
  display: flex;
  flex-direction: column;

  > li { border-bottom: 1px solid var(--setup-line); }
  > li:last-child { border-bottom: 0; }
}
.setup-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0;

  &:hover .setup-row__title { text-decoration: underline; }
}
.setup-row__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.setup-row__title { font-size: 1.0625rem; font-weight: 600; }
.setup-row__sub { font-size: 0.9375rem; color: var(--setup-muted); }
.setup-row__sub--open { font-weight: 500; color: var(--setup-green); }

/* ── Send a photo of your ID: the two pick tiles ─────────────────────── */

.id-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1.5rem 1rem;
  border: 1.5px solid var(--setup-line);
  border-radius: 0.75rem;
  text-align: center;
  cursor: pointer;

  svg { width: 2rem; height: 2rem; color: var(--setup-green); }
  &:focus-within { outline: 2px solid var(--setup-green); outline-offset: 2px; }
}
.id-tile__title { font-size: 1.0625rem; font-weight: 600; }
.id-tile__hint { font-size: 1rem; color: var(--setup-soft-ink); overflow-wrap: anywhere; }
.id-tile--picked { border-color: var(--setup-green); }
.id-tile--picked .id-tile__hint { font-weight: 600; color: var(--setup-green); }
/* The real file input stays in the tile for the keyboard and the screen
   reader; the tile is what you see and tap. */
.id-tile__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Read an agreement ───────────────────────────────────────────────── */

.agreement-text {
  gap: 0;
  font-size: 1.0625rem;
  line-height: 1.55;

  p + p { margin-top: 0.875rem; }
}
.agreement-consent__form { display: flex; flex-direction: column; gap: 1rem; }
.agreement-consent__check {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 1.0625rem;
  line-height: 1.4;
  cursor: pointer;

  .checkbox { flex-shrink: 0; margin-top: 0.125rem; }
}
.agreement-consent__done { font-size: 1.0625rem; line-height: 1.5; }
.agreement-consent__updated {
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  background: var(--setup-amber-tint);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--setup-amber);
}

/* ── Emergency contacts ──────────────────────────────────────────────── */

.contact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
}
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.contact__name { font-size: 1.125rem; font-weight: 600; }
.contact__relationship { color: var(--setup-muted); }
.contact__reach { overflow-wrap: anywhere; }
.contact__edit {
  flex-shrink: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--setup-green);

  &:hover { text-decoration: underline; }
}

/* Add or change a contact. */
.setup-form__field { display: flex; flex-direction: column; gap: 0.375rem; }
.setup-form__label { font-size: 1.0625rem; font-weight: 600; }
.setup-form__remove-form { margin-top: 1.25rem; text-align: center; }
.setup-form__remove {
  font-size: 0.9375rem;
  color: var(--setup-muted);
  text-decoration: underline;
  cursor: pointer;

  &:hover { color: var(--setup-ink); }
}
