%flash {
  margin-bottom:$gap;
  @include respond-to(min-menu-collapse) {
    margin-bottom:$box-margin;
  }
  padding: $gap;
  padding-left: 6*$gap;
  padding-right: 1.5em;
  position: relative;
  @extend %border-radius-large;
  //@extend %box-shadow;
  a{
	//color: $white;
  }
  & > .icon-close {
	position: absolute;
	right: 0;
	top: 0;
	opacity: 0.5;
    width: 1.5em;
    line-height: 1.5em;
    text-align: center;
	&:hover {
		opacity: 1
  	}
	&:before {
      font-size: 1em;
	}
  }
  p{
    &:last-child{
      margin-bottom: 0;
    }
  }

}
@mixin flash-icon($icon,$color) {
  @include icon($icon);
  position: absolute;
  left: 0;
  top: 50%;
  bottom: 0;
  width: 6*$gap;
  padding:1.5*$gap 0;
  text-align: center;
  font-size:2em;
  margin-top: -1em;
  line-height: 1;
  color: $color;
}
@mixin flash($background,$icon){
  $local-background: lighten($background,10%);
  @extend %flash;
  background: $local-background;
  border: 1px solid darken($local-background,20%);
  color: background-to-color($local-background);
  a{
    color: background-to-color($local-background);
    text-decoration: underline;
  }
  &:before{
    @include flash-icon($icon, background-to-color($local-background));
    opacity: 0.75;
  }
  &>.icon-close{
    $background: darken($local-background,20%);
    //border-color: $background;
    //background: $background;
    color: background-to-color($local-background);
  }
}
%flash-success{
  @include flash($color-positive,notice);
}
%flash-notice{
  @include flash($color-highlight,warning);
}
%flash-warning{
  @include flash($color-important,warning);
}
%flash-error{
  @include flash($color-negative,error);
}
%flash-info{
  @include flash($color-notice,notice);
}