/* C7 Banner (x-banner), ux §4 C7. Built 26 Sep 2026 for 6.3 Enter your code / Get your code.
   Built so far: error (the error summary "There is a problem", and "we couldn't reach you") and warning (waiting:
   "try again in an hour"). Info and success come with the screens that need them.
   A 4px left border in the variant colour, the pale variant ground, a bold title and a short body. No shadows.
   Error summary: role="alert", tabindex="-1", gets focus on page load (ux §10.2); its links jump to each field. */

.banner {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--inter);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: var(--_font-weight---regular);
  color: var(--color-text);
}

.banner:focus-visible,
.banner:focus {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.banner__title {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: var(--_font-weight---bold);
}

.banner__title .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.banner__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
}

.banner__list {
  margin: 0;
  padding-left: var(--space-md);
  list-style: disc;
}

/* Links and the link-style button run in the text like words (never as blocks) */
.banner__link,
.banner__button {
  display: inline;
  text-align: left;
  color: var(--color-text);
  font-weight: var(--_font-weight---bold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.banner__button {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.banner__form {
  display: inline;
  margin: 0;
}

/* Error: wrong or failed (ux §2.1: danger means wrong) */
.banner.is_error {
  border-left-color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.banner.is_error .banner__title {
  color: var(--color-danger);
}

/* Warning: waiting (ux §2.1: warning means waiting) */
.banner.is_warning {
  border-left-color: var(--color-warning);
  background-color: var(--color-warning-bg);
}

.banner.is_warning .banner__title {
  color: var(--color-warning);
}

/* A phone number never breaks across lines */
.banner__link[href^="tel:"] {
  white-space: nowrap;
}

/* Added 27 Sep 2026 for 6.4: success (a flash after an action, role="status") and info (a notice) */
.banner.is_success {
  border-left-color: var(--color-success);
  background-color: var(--color-success-bg);
}

.banner.is_success .banner__title {
  color: var(--color-success);
}

.banner.is_info {
  border-left-color: var(--color-primary);
  background-color: var(--color-primary-bg);
}

.banner.is_info .banner__title {
  color: var(--color-primary);
}
