@dismis-button: '<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19"><path fill="#fff" d="M9.5 0C4.3 0 0 4.3 0 9.5S4.3 19 9.5 19 19 14.7 19 9.5 14.7 0 9.5 0zM13.4 11.7l-1.7 1.7 -2.2-2.2 -2.2 2.2 -1.7-1.7 2.2-2.2L5.6 7.3l1.7-1.7 2.2 2.2 2.2-2.2 1.7 1.7 -2.2 2.2L13.4 11.7z"/></svg>';

@flash_height: 64px;
@flash_overlap: 10px;

.flash {
  position: fixed;
  z-index: @z-index-10--flash;
  top: -(@flash_height + @flash_overlap);
  left: 0;
  width: 100%;
  min-width: @container-width;
  background-image: linear-gradient(15deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .3) 100%);
  padding-top: @flash_overlap;
  text-align: center;
  font-size: @text-size-3;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  transition: transform 500ms @easeInOutBack;
  will-change: transform;

  &,
  p {
    line-height: @flash_height;
    color: @text-color-contrast-high;
  }

  p {
    margin: 0;
  }

  a {
    border-bottom: 1px solid;
    color: inherit;
    text-decoration: none;
    transition: border-color 200ms;

    &:hover {
      border-bottom-color: transparent;
    }
  }
}

.flash--visible {
  transform: translateY(@flash_height);
}

.flash,
.flash--info {
  background-color: lighten(@background-color-info, 12%);
}

.flash--success {
  background-color: desaturate(darken(@background-color-success, 4%), 10%);
}

.flash--error {
  background-color: saturate(lighten(@background-color-error, 12%), 30%);
}

.flash__container {
  width: @container-width;
  margin: auto;
}

.flash__dismiss-button {
  .size(36px);
  .svg-bg(@dismis-button);
  position: absolute;
  right: 20px;
  top: 50%;
  margin-top: -14px;
  border: none;
  opacity: .8;
  transition: opacity 200ms;

  &:hover {
    opacity: 1;
  }

  &:active {
    transform: translateY(1px);
  }
}
