/* Status messages (brandbook "Messages"): a tinted notice with a 3 px rule
   on the start edge and the type's icon. Emitted by
   templates/misc/status-messages.html.twig. Core's .messages and
   .messages--status|warning|error (misc/message.js, and markup the module
   writes into AJAX responses) share the band; they carry no icon. So does
   mamaney_pwa's push banner (.mamaney-push-banner, which push-banner.js
   builds on any signed-in page), as an info band. The signing mock notice
   (.signing-mock-notice, SigningDialog::mockNotice()) is a warning band with
   its own flask icon. */
.mm-msg,
.messages,
.mamaney-push-banner,
.signing-mock-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--mm-space-3) 14px;
  border-left: 3px solid;
  border-radius: var(--mm-radius-field);
  color: var(--mm-text);
  font-size: 15px;
  line-height: 1.45;
}

/* No icon to sit beside: the module's markup may hold several blocks. */
.messages {
  display: block;
}

.mm-msg > svg,
.signing-mock-notice > svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.mm-msg__body {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mm-msg__list {
  margin: 0;
  padding-left: 18px;
}

.mm-msg__list > li + li {
  margin-top: var(--mm-space-1);
}

.mm-msg a,
.messages a,
.mamaney-push-banner a {
  font-weight: 600;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

.mm-msg--ok,
.messages--status {
  background: var(--mm-ready-surface);
  border-color: var(--mm-ready);
}

.mm-msg--ok > svg {
  color: var(--mm-ready);
}

.mm-msg--warning,
.messages--warning,
.signing-mock-notice {
  background: var(--mm-action-surface);
  border-color: var(--mm-action);
}

.mm-msg--warning > svg,
.signing-mock-notice > svg {
  color: var(--mm-action);
}

.mm-msg--error,
.messages--error {
  background: var(--mm-danger-surface);
  border-color: var(--mm-danger);
}

.mm-msg--error > svg {
  color: var(--mm-danger);
}

.mm-msg--info,
.mamaney-push-banner {
  background: var(--mm-primary-surface);
  border-color: var(--mm-primary);
}

.mm-msg--info > svg {
  color: var(--mm-primary);
}

/* The push banner: its message, the link to the notification settings and
   the close button on one line, which wraps on a narrow screen. */
.mamaney-push-banner {
  align-items: center;
  flex-wrap: wrap;
  gap: var(--mm-space-1) var(--mm-space-3);
}

.mamaney-push-banner__message {
  flex: 1 1 14em;
  min-width: 0;
}

.mamaney-push-banner__link {
  color: var(--mm-primary);
}

.mamaney-push-banner__close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -6px -4px 0;
  padding: 0;
  border: 0;
  border-radius: var(--mm-radius-control);
  background: none;
  color: var(--mm-muted);
  cursor: pointer;
}

.mamaney-push-banner__close:hover {
  color: var(--mm-text);
}

.mamaney-push-banner__close:focus-visible {
  outline: none;
  box-shadow: var(--mm-focus);
}
