@import '@lightspeed/cirrus-tokens/index.scss';

.cr-alert {
  padding: $cr-spacing-2 $cr-spacing-3;
  border-radius: $cr-radius-2;
  border-top: 4px solid;
  color: $cr-gray;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 3px 6px 0 rgba(0, 0, 0, 0.03), 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.cr-alert__content-wrap {
  flex: 1;
}

.cr-alert--info {
  background-color: $cr-blue-100;
  border-color: $cr-blue;
}

.cr-alert--success {
  background-color: $cr-green-100;
  border-color: $cr-green-300;
}

.cr-alert--warning {
  background-color: $cr-orange-100;
  border-color: $cr-orange-200;
}

.cr-alert--danger {
  background-color: $cr-maple-100;
  border-color: $cr-maple-200;
}

.cr-alert__title {
  margin: 0 0 $cr-spacing-1;
  font-weight: $cr-bold;
  font-size: $cr-text;
  color: $cr-night;
}

.cr-alert__content {
  color: $cr-gray;
  font-size: $cr-text-s;
}

.cr-alert__close {
  background-color: rgba($cr-night, 0.1);
  border-radius: $cr-radius-circle;
  border: none;
  font-size: 1rem;
  color: $cr-night;
  cursor: pointer;
  width: 1em;
  height: 1em;
  padding: 0;
  position: relative;

  &:focus {
    outline: none;
  }
}

.cr-alert__close > svg {
  width: 0.5em;
  height: 0.5em;
  fill: $cr-night;
  position: absolute;
  top: 0.25em;
  left: 0.25em;
  right: 0;
  bottom: 0;
}
