/* ============================================================
   components/budget-note.css — .dd-budget
   The budget note under every public price (#352): a question, then
   two ways in side by side — the mailing list and the sponsorship
   program. Layout only; the surface is .dd-card--flat and the signup
   is .dd-newsletter.

   Markup: partials/_budget_note.html; `data-dd-budget-wait` holds it back
   until a price is on screen (below). It takes the width of whatever
   holds it — the booking widget, the intake, the pricing page's
   narrow column — so it lines up under the price it answers.
   ============================================================ */

.dd-budget {
  margin-top: var(--space-8);
}

/* Under a widget, the note waits for the widget's first price (components.js
   adds .is-priced on `dd:price-shown`). Gated on .dd-js like the reveals, so a
   page whose script never ran still shows it. */
html.dd-js .dd-budget[data-dd-budget-wait]:not(.is-priced) {
  display: none;
}

.dd-budget__head {
  margin-bottom: var(--space-6);
}

.dd-budget__title {
  margin: var(--space-2) 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  line-height: var(--lh-tight);
  color: var(--text);
}

.dd-budget__ways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
}

/* Each way is a column whose action sits at its foot, so the field and
   the button line up whatever the two paragraphs above them run to. */
.dd-budget__way {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.dd-budget__way > .dd-newsletter {
  align-self: stretch;
  margin-top: auto;
}

.dd-budget__email {
  margin-top: auto;
}

.dd-budget__label {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.dd-budget__text {
  margin: 0;
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .dd-budget {
    padding: var(--space-6);
  }

  .dd-budget__ways {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

@media (max-width: 480px) {
  .dd-budget {
    padding: var(--space-5);
  }
}
