/* The petitions form and the proof of registration (M2-FORM-REQ, FREQ): the design system's tokens only. Fields, notices, buttons
   and the receipt are the kit's (components.css); the head is the event proposal's shape. */

.request-head {
  padding-block: var(--spacing-24);
}

.request-head h1 {
  max-width: 24ch;
  margin-bottom: var(--spacing-16);
  overflow-wrap: anywhere;
  hyphens: auto;
}

.request-head .lead {
  max-width: var(--size-44rem);
  margin-bottom: 0;
}

.request-body {
  padding-bottom: var(--spacing-48);
}

.request-form {
  display: grid;
  gap: var(--spacing-24);
}

.request-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--spacing-16) var(--spacing-24);
  align-items: start; /* the controls of a row start at the same y (FO-7) */
}

.request-grid > .request-wide,
.request-grid > .field-check {
  grid-column: 1 / -1;
}

.request-slot[hidden] {
  display: none;
}

.request-rule {
  margin: 0 0 var(--spacing-16);
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.request-proof {
  max-width: var(--size-48rem);
}

.request-actions {
  margin-top: var(--spacing-24);
}

/* The ONVV line above the proof is for paper alone: the header is not printed, so the sheet names its issuer */
.request-print-id {
  display: none;
}

.request-actions [hidden] {
  display: none;
}

.receipt__line,
.receipt__statement {
  margin-block: var(--spacing-16) 0;
}

@media (min-width: 768px) {
  .request-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Print: the proof alone, without the header, footer, menus and buttons ---------- */

@media print {
  @page {
    margin: 18mm;
  }

  .skip-link,
  .site-header,
  .site-footer,
  .newsletter,
  .cookie-banner,
  .breadcrumb-row,
  .breadcrumb,
  .request-actions,
  .request-head .lead,
  .request-head .segmented,
  #live-status {
    display: none;
  }

  /* The cookie banner is not printed and the page keeps no room for it at its bottom, answered or not: a sheet with that
     padding would run onto a second page. The selector is as specific as the banner's own rule of cookie-banner.css. */
  html body:has(.cookie-banner:not([hidden]), .cookie-banner:target) {
    padding-bottom: 0;
  }

  .request-head,
  .request-body {
    padding-block: 0;
  }

  .request-proof {
    max-width: none;
  }

  .request-print-id {
    display: block;
    margin: 0 0 var(--spacing-8);
    font-weight: var(--font-weight-semibold);
  }

  /* The proof is one sheet, in plain black on white: no panel colour, shadow or radius. Its rows and steps are kept whole; the
     .receipt itself is not (a block that is kept whole and does not fit moves to a second page). */
  .receipt__facts > div,
  .receipt__steps li {
    break-inside: avoid;
  }

  .receipt__notice {
    background: none;
    box-shadow: none;
    border-color: currentColor;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
