/*
Digitpaint's Front-end Advent 2017
https://advent2017.digitpaint.nl

 ___                        _               ___    _    _
| . \ ___  ___  ___ ._ _ _ | |_  ___  _ _  |_  | _| |_ | |_
| | |/ ._>/ | '/ ._>| ' ' || . \/ ._>| '_>  / /   | |  | . |
|___/\___.\_|_.\___.|_|_|_||___/\___.|_|   /_/    |_|  |_|_|


Copyright 2017, Digitpaint (https://digitpaint.nl)
The code in this file licensed under the MIT License. https://opensource.org/licenses/MIT
*/

.wrapper {
  width: 100%;
}

.wrapper--small {
  width: 50%;
}

.grid {
  display: grid;
  margin-bottom: 3px;
  padding: 10px;
  background-color: #5f276d;
  grid-auto-rows: 100px;
  grid-gap: 20px;
}

.grid--fixed {
  grid-template-columns: repeat(5, 135px);
}

.grid--flexible {
  grid-template-columns: repeat(5, 1fr);
}

.grid--fill {
  grid-template-columns: repeat(auto-fill, 135px);
}

.grid--fit {
  grid-template-columns: repeat(auto-fit, 135px);
}

.grid--fill-flexible {
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
}

.grid--fit-flexible {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.grid--fit-varying-widths {
  grid-template-columns: repeat(auto-fit, 135px 400px 135px);
}

.box {
  position: relative;
  transition: all .2s ease-in-out;
  border: 1px dotted #fff;
  border-radius: 5px;
  background-image: url('/7/present.svg');
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: contain;
  color: #fff;
  cursor: pointer;
}

.box::before {
  content: "×";
  position: absolute;
  top: 0em;
  right: 0.1em;
  line-height: 1;
  font-family: arial, sans-serif;
  font-size: 20px;
  pointer-events: none;
}

.box:hover {
  transform: translateX(0);
  backface-visibility: hidden;
  perspective: 1000px;
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

.box--closing,
.box--closing:hover {
  opacity: 0;
}

.header {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.header h2 {
  margin-top: 0;
}

.header .button-group {
  margin-top: 0;
  margin-left: auto;
}

@keyframes shake {
  10%, 90% {
    transform: translateX(-1px);
  }

  20%, 80% {
    transform: translateX(2px);
  }

  30%, 50%, 70% {
    transform: translateX(-4px);
  }

  40%, 60% {
    transform: translateX(4px);
  }
}

