/* Subscribe to updates (M2-FORM-NEWS): the design system's tokens only. Fields, checkboxes, notices, cards and buttons are the
   kit's (components.css); the steps indicator takes the tabs' underline, as in the prototype (v3-steps). */

.newsletter-page {
  max-width: var(--size-45rem);
}

.newsletter-page .lead {
  margin-bottom: var(--spacing-24);
}

/* The steps: an ordered list that is also a .tabs row (components.css gives the 48 px tab, the underline on the current step and the
   one row that scrolls below 768 px); the current step is marked by colour and the underline, not by colour alone */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-8) var(--spacing-16);
  margin: 0 0 var(--spacing-24);
  padding: 0;
  list-style: none;
}

.steps li {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: var(--control-height);
  min-height: var(--control-height);
  padding: 0 var(--spacing-8);
  border-bottom: var(--border-width-2) solid transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-16);
  line-height: var(--line-height-24);
  font-weight: var(--font-weight-medium);
  transition:
    color var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard);
}

.steps li[aria-current="step"] {
  border-bottom-color: var(--color-action);
  color: var(--color-action);
}

.newsletter-step__title {
  margin: 0 0 var(--spacing-16);
  font-size: var(--font-size-20);
  line-height: var(--line-height-28);
}

.newsletter-step > p,
.newsletter-step > .notice {
  margin-block: 0 var(--spacing-16);
}

.newsletter-form {
  padding: var(--spacing-24);
}

/* Language and topics: a group with its legend, the boxes one under another */
.newsletter-choice {
  min-width: 0;
  margin: 0;
  padding: var(--spacing-12) var(--spacing-16) var(--spacing-16);
  border: var(--border-width-1) solid var(--color-border);
  border-radius: var(--border-radius-8);
}

.newsletter-choice legend {
  padding-inline: var(--spacing-8);
  font-weight: var(--font-weight-medium);
}

.newsletter-choice__list {
  display: grid;
  gap: var(--spacing-12);
  margin-top: var(--spacing-8);
}

/* FO-2: the message of a checkbox in error starts at the x of the label text, the box (1.5rem) and the 12 px gap after it, as under the consent */
.newsletter-choice .field-error {
  margin-top: var(--spacing-8);
  padding-inline-start: calc(var(--size-1-5rem) + var(--spacing-12));
}

.newsletter-privacy {
  margin: 0;
}

/* The notice of a step that went well, in the positive colours of the receipt */
.notice.success {
  border-color: var(--color-border-positive-secondary);
  background: var(--color-background-positive-secondary);
}

.notice.success .notice-title {
  color: var(--color-text-positive-on-secondary);
}

/* The second form of 'Preferințe' (brief-m2-19): the heading and one field under the subscribe form, in the same card */
.newsletter-again {
  margin-top: var(--spacing-32);
}

.newsletter-again__title {
  margin: 0 0 var(--spacing-16);
  font-size: var(--font-size-18);
  line-height: var(--line-height-28);
}

.newsletter-again > .notice {
  margin-block: 0 var(--spacing-16);
}
