#alert-block {
  position: fixed;
  right: 50px;
  bottom: 50px;
  width: 500px;
  z-index: 1050;
}

body.frontend-layout #alert-block {
  max-width: calc(100% - 100px);
  max-height: min(50vh, 24rem);
  overflow-y: auto;
  overflow-wrap: anywhere;
}

body.frontend-layout .modal-alert-block {
  flex: 0 0 auto;
  max-height: min(25vh, 12rem);
  overflow-y: auto;
  overflow-wrap: anywhere;
}

body.frontend-layout #alert-block .alert,
body.frontend-layout .modal-alert-block .alert {
  margin-bottom: .5rem;
}

body.frontend-layout #alert-block .alert:last-child,
body.frontend-layout .modal-alert-block .alert:last-child {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  body.frontend-layout #alert-block {
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 2rem);
    max-width: none;
  }

  body.frontend-layout #alert-block .alert,
  body.frontend-layout .modal-alert-block .alert {
    padding: .75rem 3rem .75rem 1rem;
    font-size: .9375rem;
    line-height: 1.5;
  }

  body.frontend-layout #alert-block .btn-close,
  body.frontend-layout .modal-alert-block .btn-close {
    padding: .875rem;
  }
}

.alert-primary-origin {
  color: #084298;
  background-color: #cfe2ff;
  border-color: #b6d4fe;
}

.alert-success-origin {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert-danger-origin {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.alert-warning-origin {
  color: #664d03;
  background-color: #FCFFD3;
  border-color: #ffecb5;
}
