.crm-container .help,
.crm-container #help,
.crm-container .status,
.crm-container .messages,
.crm-container .alert,
.crm-container .alert-success,
.crm-container .status.crm-ok,
.crm-container .status.crm-ok.alert {
  background-color: var(--crm-alert-success-bg);
  border: var(--crm-alert-border-width) solid var(--crm-alert-success-border);
  color: var(--crm-alert-success-text);
  margin: var(--crm-alert-margin);
  padding: var(--crm-alert-padding);
  border-radius: var(--crm-roundness);
}
.crm-container .help > *:first-child {
  margin-top: 0;
}
.crm-container .help p,
.crm-container .status p,
.crm-container .messages p,
.crm-container .alert p {
  color: var(--crm-alert-success-text);
}
.crm-container .alert-warning p {
  color: var(--crm-alert-warning-text);
}
.crm-container .help li,
.crm-container .status li,
.crm-container .messages li {
  color: var(--crm-alert-success-text);
}
.crm-container .status.alert,
.crm-container .alert-warning,
.crm-container .messages.warning {
  background-color: var(--crm-alert-warning-bg);
  border-color: var(--crm-alert-warning-border);
  color: var(--crm-alert-warning-text);
}
.crm-container .status.error {
  background-color: var(--crm-alert-danger-bg);
  border-color: var(--crm-alert-danger-border);
  color: var(--crm-alert-danger-text);
}
.crm-container .status.alert li,
.crm-container .alert-warning li,
.crm-container .messages.warning li {
  color: var(--crm-alert-warning-text);
}
.crm-container .alert-info,
.crm-container .messages.crm-empty-table {
  background-color: var(--crm-alert-info-bg);
  border-color: var(--crm-alert-info-border);
  color: var(--crm-alert-info-text);
}
.crm-container .alert-danger {
  background-color: var(--crm-alert-danger-bg);
  border-color: var(--crm-alert-danger-border);
  color: var(--crm-alert-danger-text);
}
.crm-container .help a:not(.btn),
.crm-container .messages a:not(.btn),
.crm-container .alert a:not(.btn),
.crm-container table tr.crm-row-selected a:not(.btn) {
  color: inherit;
}
.crm-container .help a,
.crm-container .messages a {
  text-decoration: underline;
}
.crm-container .help a:hover,
.crm-container .messages a:hover,
.crm-container .help a:focus,
.crm-container .messages a:focus {
  color: inherit;
  text-decoration: none;
}

/* BS alert close */

.crm-container button.close,
#bootstra-theme button.close {
  float: right;
  padding: 0;
  border: 0;
  cursor: var(--crm-hover-clickable);
  background: transparent;
  appearance: none;
  font-size: var(--crm-r1);
  line-height: 1;
  color: var(--crm-c-darkest) !important;
  text-shadow: 0 1px 0 #fff;
  font-weight: bold;
  opacity: .2;
}
.crm-container button.close:hover,
.crm-container button.close:focus,
#bootstra-theme button.close:hover,
#bootstra-theme button.close:focus {
  background: transparent;
  opacity: 0.4;
}
.crm-container .alert-dismissable,
.crm-container .alert-dismissible {
  padding-right: 35px;
}
.crm-container .alert-dismissable .close,
.crm-container .alert-dismissible .close {
  position: relative;
  top: -2px;
  right: -21px;
  color: inherit;
}

/* Alerts in tables (ref https://github.com/civicrm/civicrm-core/pull/31605) */

#bootstrap-theme td > p.alert.ng-binding {
  width: fit-content;
  margin: 1rem auto;
  padding: var(--crm-padding-small) var(--crm-padding-reg);
}
