/* ===========================================================
   Contact letter (contact page): a short letter to Evy with blanks to
   fill in, and a Send button under it. Full screen, the letter in the
   middle, left-aligned like a real letter. contact-letter.js builds it
   from Sanity, sizes the blanks and sends it.
   =========================================================== */
.eod-letter {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--eod-white);
  color: var(--eod-ink);
  padding-top: 8em;
  padding-bottom: 6em;
}
.eod-letter__group {
  width: 100%;
  max-width: 38rem; /* ~600px, a letter's width */
  margin: 0 auto;
}
.eod-letter__text {
  /* Header 3, a little more air between the lines for the blanks */
  font-size: var(--eod-fs-h3);
  line-height: 1.3;
  letter-spacing: var(--eod-ls-h3);
}
.eod-letter__line {
  margin: 0;
}
.eod-letter__line--gap {
  margin-top: 1.3em;
}

/* the blanks: an underline you write on */
.eod-letter__blank {
  display: inline-block;
  min-width: 4ch;
  max-width: 100%;
  margin: 0 0.05em;
  padding: 0 0 0.05em;
  border: 0;
  border-bottom: 1.5px dashed var(--eod-text-secondary);
  border-radius: 0;
  background: transparent;
  color: var(--eod-ink);
  font: inherit;
  letter-spacing: inherit;
  vertical-align: baseline;
  outline: none;
  transition: border-color 0.25s ease;
}
.eod-letter__blank::placeholder {
  color: #a4a7ae;
  opacity: 1;
}
.eod-letter__blank:hover {
  border-bottom-color: var(--eod-ink);
}
.eod-letter__blank:focus {
  border-bottom-style: solid;
  border-bottom-color: var(--eod-ink);
}
.eod-letter__blank.is-invalid {
  border-bottom-style: solid;
  border-bottom-color: #d92d20;
}
/* measures a blank's text (contact-letter.js), never seen */
.eod-letter__sizer {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font-size: var(--eod-fs-h3);
  letter-spacing: var(--eod-ls-h3);
  pointer-events: none;
}
.eod-letter__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.eod-letter__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5em;
  margin-top: 2.5em;
}
.eod-letter__status {
  flex: 1 1 auto;
  margin: 0;
  /* Paragraph 2 */
  font-size: var(--eod-fs-p2);
  line-height: var(--eod-lh-p2);
  letter-spacing: var(--eod-ls-p2);
  color: #d92d20;
}
.eod-letter__status:empty {
  display: none;
}

.eod-letter__done {
  outline: none;
  font-size: var(--eod-fs-h3);
  line-height: 1.3;
  letter-spacing: var(--eod-ls-h3);
}
.eod-letter__done[hidden] {
  display: none;
}
.eod-letter__done-body {
  margin: 0.75em 0 0;
  /* Paragraph 1, secondary */
  font-size: var(--eod-fs-p1);
  line-height: var(--eod-lh-p1);
  letter-spacing: var(--eod-ls-p1);
  color: var(--eod-text-secondary);
}

@media (max-width: 767px) {
  .eod-letter {
    padding-top: 7em;
    padding-bottom: 4em;
  }
  .eod-letter__foot {
    flex-direction: column;
    align-items: flex-end;
    gap: 1em;
  }
  .eod-letter__status {
    align-self: stretch;
  }
}
/* a blank + the punctuation right after it, kept on one line */
.eod-letter__glue {
  white-space: nowrap;
}
