/* The forms' rules from ~/friendraiser-theme main 971b631, assets/css/theme.css, for the footer signup box and the
   /contact/ form, with the giving sites' footer rules at the end. The constituition tokens they use are in
   /reference-tokens.css. */
.fr-signup [hidden],
.fr-contact[hidden],
.fr-contact [hidden] {
  display: none !important;
}

.fr-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buttons: outline (constituition .cn-btn), 40 px drawn, 44 px tall to tap. */
.fr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cn-target-minimum);
  padding: var(--cn-component-button-medium-padding-y) var(--cn-component-button-medium-padding-x);
  border: 0;
  border-radius: var(--cn-component-button-radius);
  box-shadow: inset 0 0 0 var(--cn-component-button-outline-border-width) var(--cn-component-button-outline-border);
  background: transparent;
  color: var(--cn-component-button-outline-foreground);
  font-family: var(--cn-type-control-medium-family);
  font-size: var(--cn-type-control-medium-size);
  font-weight: var(--cn-type-control-medium-weight);
  line-height: var(--cn-type-control-medium-lh);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.fr-btn:hover {
  box-shadow: inset 0 0 0 1px var(--cn-component-button-outline-hover);
  color: var(--cn-component-button-outline-hover);
}

.fr-btn:focus-visible {
  box-shadow: none;
}

/* ------------------------------------------------------------------ the issue */
/* One column under the title: prose of 420→504 px from 1024 (504 at 1440), the full column below.
   stacked and full width below. */

.fr-signup {
  max-width: 504px;
  margin-block-start: var(--cn-space-32);
  scroll-margin-top: var(--cn-space-24);
}

.fr-signup-label {
  display: block;
  margin: 0 0 var(--cn-space-8);
  font-family: var(--cn-type-field-label-family);
  font-size: var(--cn-type-field-label-size);
  font-weight: var(--cn-type-field-label-weight);
  line-height: var(--cn-type-field-label-lh);
}

.fr-signup-line {
  display: flex;
  gap: var(--cn-space-8);
}

.fr-field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--cn-control-large);
  padding: 0 var(--cn-space-16);
  border: 0;
  border-radius: var(--cn-component-field-radius);
  box-shadow: inset 0 0 0 1px var(--cn-component-field-border);
  background: var(--cn-component-field-background);
  color: var(--cn-component-field-text);
  font-family: var(--cn-type-field-family);
  font-size: var(--cn-type-field-size);
  font-weight: var(--cn-type-field-weight);
  line-height: var(--cn-type-field-lh);
}

/* A field the reader must fix: the danger colour on its edge, beside the error line (constituition's
   danger rule, FINAL · 03). */
.fr-field[aria-invalid="true"] {
  box-shadow: inset 0 0 0 var(--cn-border-2) var(--cn-text-danger);
}

.fr-field::placeholder {
  color: var(--cn-text-muted);
  opacity: 1;
}

.fr-btn--filled {
  flex: none;
  min-height: var(--cn-component-button-large-height);
  padding: var(--cn-component-button-large-padding-y) var(--cn-component-button-large-padding-x);
  box-shadow: none;
  background: var(--cn-component-button-filled-background);
  color: var(--cn-component-button-filled-foreground);
  font-family: var(--cn-type-control-large-family);
  font-size: var(--cn-type-control-large-size);
  font-weight: var(--cn-type-control-large-weight);
  line-height: var(--cn-type-control-large-lh);
}

.fr-btn--filled:hover {
  box-shadow: none;
  background: var(--cn-component-button-filled-hover);
  color: var(--cn-component-button-filled-foreground);
}

.fr-btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
}

.fr-signup-note,
.fr-signup-said {
  margin: var(--cn-space-8) 0 0;
  color: var(--cn-text-muted);
  font-family: var(--cn-type-metadata-family);
  font-size: var(--cn-type-metadata-size);
  line-height: var(--cn-type-metadata-lh);
}

.fr-signup-said {
  margin: 0;
  color: var(--cn-text-default);
  font-family: var(--cn-type-body-small-family);
  font-size: var(--cn-type-body-small-size);
  line-height: var(--cn-type-body-small-lh);
}

.fr-signup-error {
  margin: var(--cn-space-8) 0 0;
  color: var(--cn-text-danger);
  font-family: var(--cn-type-metadata-family);
  font-size: var(--cn-type-metadata-size);
  line-height: var(--cn-type-metadata-lh);
}

@media (max-width: 767.98px) {
  .fr-signup-line {
    flex-direction: column;
  }

  .fr-signup-line .fr-btn--filled {
    width: 100%;
  }
}

/* ------------------------------------------------------------------ contact form */
/* Under the signup box on brand pages, same column, fields and lines. Its button is the outline one:
   the signup box keeps the page's one filled accent action. */

.fr-contact {
  max-width: 504px;
  margin-block-start: var(--cn-space-48);
  scroll-margin-top: var(--cn-space-24);
}

.fr-contact-title {
  margin: 0;
  font-family: var(--cn-type-section-title-family);
  font-size: var(--cn-type-section-title-size);
  font-weight: var(--cn-type-section-title-weight);
  line-height: var(--cn-type-section-title-lh);
  overflow-wrap: anywhere;
}

.fr-contact-intro {
  margin: var(--cn-space-8) 0 var(--cn-space-24);
  font-family: var(--cn-type-body-small-family);
  font-size: var(--cn-type-body-small-size);
  line-height: var(--cn-type-body-small-lh);
}

.fr-contact .fr-field {
  display: block;
  width: 100%;
}

.fr-contact-gap {
  margin-block-start: var(--cn-space-16);
}

.fr-contact-message {
  padding-block: var(--cn-space-12);
  resize: vertical;
}

.fr-contact-send {
  margin-block-start: var(--cn-space-16);
}

/* The error summary (GOV.UK Design System's error summary, without its title): constituition's error
   notice, a 1 px danger rule above the lines (FINAL · 03, search.astro). It takes focus to be read out,
   and shows the design system's focus ring while it has it, as GOV.UK's summary does. */
.fr-contact-summary {
  scroll-margin-block: var(--cn-space-24);
  margin-block-end: var(--cn-space-24);
  padding-block-start: var(--cn-space-16);
  border-top: 1px solid var(--cn-text-danger);
}

/* One line shows at a time. */
.fr-contact-summary .fr-signup-error {
  margin-block-start: 0;
}

/* Not while focused: the global focus style's foreground must win on its fill (WCAG 1.4.3). */
.fr-contact-summary a:not(:focus-visible) {
  color: inherit;
  text-decoration-color: currentColor;
}

.fr-contact-summary:focus {
  outline: var(--cn-border-2) solid var(--cn-focus-ring);
  outline-offset: 2px;
}

/* A rule of its own: a browser without :focus-visible drops the whole selector list it is in. */
.fr-contact-done:focus-visible {
  outline: var(--cn-border-2) solid var(--cn-focus-ring);
  outline-offset: 2px;
}

/* The sent line takes focus to be read out; the browser's own ring shows only to keyboard users. */
.fr-contact-done:focus:not(:focus-visible) {
  outline: none;
}


/* The subscribed page's messages are hidden until the script shows one. */
[data-fr-subscribed][hidden],
[data-fr-confirmed][hidden] {
  display: none !important;
}

/* ------------------------------------------------------------------ giving sites' footer */
/* The footer is dark (--cn-color-ink) in both themes, so the box takes the danger colour constituition sets for a dark
   ground (reference-tokens.css, dark theme --cn-text-danger, #F08A80: 6.83:1 on #211E1C), for the error lines and a
   field's edge. Two classes, so .site-footer p does not grey the error lines. */
.site-footer .fr-signup {
  --cn-text-danger: #F08A80;
}

.site-footer .fr-signup .fr-signup-error {
  color: var(--cn-text-danger);
}

/* The result line takes focus to be read out, as the contact form's sent line does. */
.fr-signup-said:focus-visible {
  outline: var(--cn-border-2) solid var(--cn-color-election-ink-on-dark);
  outline-offset: 2px;
}

.fr-signup-said:focus:not(:focus-visible) {
  outline: none;
}
