/* Add-a-question form, also used by the Home Screen page.
   The paper column and meadow live in storybook.css. */

.add-page { background: transparent; }

.add-main { padding: 0 0 0.5rem; }

.add-card {
  overflow-wrap: break-word;
}

.add-lede {
  font-size: 1.05em;
  line-height: 1.5;
  margin: 0 auto 1.6rem;
  text-align: center;
  max-width: 36em;
}

.field-pair {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 1.5rem;
}

.add-form .field { margin: 0 0 1.5rem; }

.add-form .field-pair .field { margin: 0; }

@media (min-width: 768px) {
  .field-pair {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    align-items: stretch;
  }

  .field-pair .field {
    display: flex;
    flex-direction: column;
  }

  .field-pair .help {
    flex: 1 1 auto;
  }

  .field-pair input {
    margin-top: auto;
  }
}

.add-form label {
  display: block;
  font-size: max(1.25rem, 1.15em);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 0.35rem;
}

.opt { font-weight: 400; color: var(--ink); }

.help {
  font-size: 1em;
  line-height: 1.45;
  margin: 0 0 0.55rem;
  color: var(--ink);
}

.add-form input[type="text"],
.add-form input[type="date"] {
  height: 56px;
}

.add-form input,
.add-form textarea,
.fb-text {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 1.1em;
  line-height: 1.4;
  color: var(--ink);
  background: #fff;
  border: 2.5px solid var(--navy);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  min-height: 56px;
}

.add-form textarea,
.fb-text {
  min-height: 8.5rem;
  resize: vertical;
}

.add-form input:focus-visible,
.add-form textarea:focus-visible,
.fb-text:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.send-actions {
  display: grid;
  gap: 0.75rem;
  margin: 0.35rem 0 1.35rem;
}

@media (min-width: 768px) {
  .send-actions {
    grid-template-columns: 1.45fr 1fr;
    align-items: stretch;
  }

  .copy-live { grid-column: 1 / -1; }
}

.btn.send,
.btn.copy-question,
.btn.ghost {
  width: 100%;
  min-height: 56px;
  font-size: 1.05em;
  min-width: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
  cursor: pointer;
  font-family: inherit;
}

.btn.send {
  box-shadow: 0 8px 16px rgba(27, 42, 74, 0.14);
}

.btn.copy-question,
.btn.ghost {
  background: var(--cream);
  color: var(--navy);
  border: 2px solid var(--navy);
  box-shadow: none;
}

.btn.copy-question:hover,
.btn.copy-question:focus-visible,
.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--soft);
  color: var(--navy);
  border-color: var(--navy);
}

.copy-live {
  margin: 0;
  min-height: 1.5em;
  text-align: center;
  font-weight: 700;
  color: var(--navy);
}

.peek { margin: 0 0 0.5rem; }

.peek summary {
  cursor: pointer;
  font-size: 1em;
  font-weight: 700;
  color: var(--navy);
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.preview {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--soft);
  border: 1.5px solid var(--box);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1em;
  margin: 0.4rem 0 0;
}

.add-alert {
  background: #FFF1D6;
  border: 2px solid var(--mustard);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  font-size: 1em;
  font-weight: 700;
  color: var(--ink);
}

.fallback {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 2px solid var(--box);
}

.fallback h2 { font-size: 1.25em; margin-bottom: 0.6rem; }

.fb-label {
  font-weight: 700;
  color: var(--navy);
  margin: 0.9rem 0 0.25rem;
  font-size: max(1.25rem, 1.05em);
}

.fb-box {
  background: var(--soft);
  border: 1.5px solid var(--box);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  word-break: break-all;
  font-size: 1em;
}

.fb-text { margin-bottom: 0.75rem; }

.copy-note {
  font-weight: 700;
  color: var(--navy);
  min-height: 1.5rem;
}

.add-note {
  margin-top: 1.5rem;
  background: rgba(243, 237, 224, 0.9);
  border: 1px solid var(--gold);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: none;
}

.add-note h2 { font-size: 1.15em; margin-bottom: 0.85rem; }

.quiet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.quiet-list li {
  display: grid;
  grid-template-columns: 2.15rem 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
  font-size: 1em;
  line-height: 1.35;
}

.quiet-list li::before {
  content: "";
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background-image: url("../images/meadow-hero-1000.jpg");
  background-repeat: no-repeat;
  background-size: 256px auto;
  box-shadow: 0 0 0 2px var(--cream), 0 3px 8px rgba(27, 42, 74, 0.2);
}

/* Windows into the meadow: bee, clover, buttercup, violet. */
.quiet-list li:nth-child(1)::before { background-position: -32px -30px; }
.quiet-list li:nth-child(2)::before { background-position: -64px -60px; }
.quiet-list li:nth-child(3)::before { background-position: -96px -121px; }
.quiet-list li:nth-child(4)::before { background-position: -224px -121px; }
