/**
 * @file
 *   Essential CSS for the Dismiss module
 */

/*
 * All messages require relative positioning
 * for the Dismiss button to be placed properly
 */
div.messages {
  position: relative;
  padding-right: 1.5em;
}

/*
 * Dismiss button
 */
.dismiss {
  position: absolute;
  top: .4em;
  right: .4em;
  display: block;
  width: 1.8em;
  cursor: pointer;
  -webkit-transition: .1s opacity linear;
  -moz-transition: .1s opacity linear;
  -ms-transition: .1s opacity linear;
  -o-transition: .1s opacity linear;
  transition: .1s opacity linear;
  text-align: center;
  text-decoration: none;
  opacity: .5;
  color: #fff;
  border: 0;
  border-radius: 3px;
  background: #ed541d;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.4);
  text-shadow: -1px -1px 0 rgba(0,0,0,0.4);
  font-weight: 900;
}

.dismiss::before {
  content: '\2715';
}

.error .dismiss {
  background: #ed541d;
}

.status .dismiss {
  color: #000;
  background: #be7;
  text-shadow: none;
}

.warning .dismiss {
  color: #000;
  background: #ed5;
  text-shadow: none;
}

/*
 * When the user mouses over the message box, make the button more prominent
 */
.messages:hover .dismiss {
  opacity: 1;
}

/*
 * Change states when users mouseover
 */
.dismiss:hover {
  text-decoration: none;
  color: #fff;
  text-shadow: -1px -1px 0 rgba(0,0,0,0.4);
}

/*
 * Change states when users click
 */
.dismiss:active {
  margin-top: 1px;
  margin-left: 1px;
  box-shadow: 0 0 1px rgba(0,0,0,0.4);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}
