/* Add feedback-background to the page body. Keep --feedback-column-width
   aligned with the width of the survey so the curves stay in the margins.
   Wide screens only: nothing here applies on a phone. */
@media (min-width: 48rem) {
  .feedback-background {
    --feedback-column-width: 32rem;
    --feedback-surface: var(--brand-surface, #f8fafc);
    --feedback-side-width: calc((100% - var(--feedback-column-width)) / 2);
    --feedback-curve: #e4edf8;
    --feedback-curve-soft: #eef3fa;
    --feedback-card-radius: 18px;
    --feedback-card-gap: 2rem; /* space above and below the card */

    /* Fill the window, and stop the card's margin collapsing through the body;
       otherwise the curves end in hard lines above and below the card. */
    min-height: 100vh;
    display: flow-root;

    background-color: var(--feedback-surface);
    background-image:
      radial-gradient(ellipse 142% 103% at -48% 4%,
        var(--feedback-curve) 58%, transparent 59%),
      radial-gradient(ellipse 153% 112% at -43% 7%,
        var(--feedback-curve-soft) 65%, transparent 66%),
      radial-gradient(ellipse 142% 105% at 148% 98%,
        var(--feedback-curve) 58%, transparent 59%),
      radial-gradient(ellipse 153% 115% at 143% 95%,
        var(--feedback-curve-soft) 65%, transparent 66%);
    background-position: left top, left top, right top, right top;
    background-size: var(--feedback-side-width) 100%;
    background-repeat: no-repeat;
    background-attachment: fixed;
  }

  /* The survey sits on a card floating over the curves, as in the mock-up,
     rather than a full-height strip. The card is at least nearly a screen tall
     so the short screens (intro, thank-you) keep their centred look. */
  .feedback-background .app {
    margin: var(--feedback-card-gap) auto;
    min-height: min(48rem, calc(100vh - 2 * var(--feedback-card-gap)));
    min-height: min(48rem, calc(100dvh - 2 * var(--feedback-card-gap)));
    background-color: var(--feedback-surface);
    border: 1px solid #dce6f1;
    border-radius: var(--feedback-card-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 48px rgba(30, 64, 120, 0.08);
  }

  /* The header keeps the card's rounded top while it sticks. */
  .feedback-background .top {
    padding: 16px 28px 12px;
    border-radius: var(--feedback-card-radius) var(--feedback-card-radius) 0 0;
  }
  .feedback-background .screen { padding: 4px 28px 24px; }

  /* The bottom bar belongs to the card: it sits at the card's foot, and on a
     long screen it sticks to the bottom of the window until the card ends. */
  .feedback-background .nav {
    position: sticky;
    bottom: 0;
    left: auto;
    right: auto;
    padding: 12px 28px 18px;
    border-top-color: #e8eef6;
    border-radius: 0 0 var(--feedback-card-radius) var(--feedback-card-radius);
  }
  .feedback-background .nav__inner { max-width: none; }
}

@media (min-width: 48rem) and (max-width: 63.99rem) {
  .feedback-background {
    --feedback-curve: #edf3fa;
    --feedback-curve-soft: #f3f6fb;
  }
}
