/* *:hover {
  outline: dashed 0.3vw rgba(155, 0, 202, 0.5);
} */

/* `Clear Floated Elements                      */
/* http://sonspring.com/journal/clearing-floats */

.clear {
  clear: both;
  display: block;
  overflow: hidden;
  visibility: hidden;
  width: 0;
  height: 0;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 2vw;
  color: #320d56;
  background-color: hsl(90, 20%, 90%);
}

body > header {
  margin: 0 0 1em 0;
  padding: 0.5em 4em;
  background-color: hsl(89, 33%, 66%);
  box-shadow: 3px 6px 8px 3px hsla(0, 0%, 0%, 0.3);
}

body > header > h1 {
  margin: 0.2em 0;
  font-size: 4em;
  font-style: italic;
  font-weight: 900;
  text-shadow: 2px 2px 4px hsla(0, 0%, 0%, 0.5);
}

body > main {
  padding-bottom: 2em;
}

body > main > section {
  position: relative;
  text-align: center;
}

body > main > section:first-child {
  z-index: 99;
}

#vote_count {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0.5em;
  text-shadow: 2px 2px 4px hsla(0, 0%, 0%, 0.5);
}

#item_display {
  height: 16em;
}

#item_row {
  transition: opacity 500ms;
  opacity: 0;
}

#item_row.opaque {
  opacity: 1;
}

.item_cell {
  display: inline-block;
  position: relative;
  margin: 0em 2em;
  border-radius: 1em;
  filter: drop-shadow(0.4em 0.6em 0.2em rgba(0, 0, 0, 0.2))
    drop-shadow(0.2em 0.25em 0.07em rgba(0, 0, 0, 0.15));
  transition: opacity 500ms, transform 350ms, filter 350ms;
}

.item_cell:nth-child(5) {
  z-index: 1;
}
.item_cell:nth-child(4) {
  z-index: 2;
}
.item_cell:nth-child(3) {
  z-index: 3;
}
.item_cell:nth-child(2) {
  z-index: 4;
}
.item_cell:nth-child(1) {
  z-index: 5;
}

.item_cell:hover,
.item_cell:focus-within {
  /* z-index: 99; */
  filter: drop-shadow(1.5em 3em 2em rgba(0, 0, 0, 0.35))
    drop-shadow(1.5em 3em 0.6em rgba(0, 0, 0, 0.15));
}

figure {
  position: relative;
  margin: auto;
  background-color: rgb(255, 255, 255);
  width: 12em;
  display: inline-block;
  cursor: pointer;
  border-radius: 1em;
  transition: transform 350ms;
}

/* vignette effect */
figure::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 1em;
  background-image: radial-gradient(
    circle,
    rgba(0, 0, 0, 0) 66%,
    rgba(49, 34, 0, 0.2) 100%
  );
}

.item_cell:hover figure,
.item_cell:focus-within figure {
  transform: scale(1.07) translateY(-0.7em) rotate(-0.025turn);
}

figure img {
  display: block;
  margin: auto;
  width: 100%;
  max-height: 12em;
  object-fit: contain;
  border-radius: 1em 1em 0 0;
}

figcaption {
  background-color: hsl(90, 33%, 66%);
  border-radius: 0 0 0.75em 0.75em;
  font-family: 'Permanent Marker';
  font-size: 1.25em;
  font-weight: bold;
  line-height: 2em;
  text-align: center;
  text-shadow: 2px 2px 4px hsla(0, 0%, 0%, 0.5);
}

#report_container {
  width: 85%;
  margin: 1em auto;
}

#report_container p {
  margin: 0.5em 0;
}

#report_container > canvas {
  margin: 0.5em;
  border: 0.2em solid gray;
  width: 80%;
  height: auto;
}

#report_container > button {
  font-size: 1em;
}

body > footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  margin: 0;
  font-size: 0.75em;
  background-color: hsl(90, 33%, 66%);
  box-shadow: 3px 6px 8px 3px hsla(0, 0%, 0%, 0.3);
  text-shadow: 2px 2px 4px hsla(0, 0%, 0%, 0.5);
}

body > footer > div {
  padding: 0.2em 4em;
}

body > footer > div > span {
  float: right;
}

body > footer > div > span > img {
  border: 0;
  width: calc(2.83 * 1.5em);
  height: 1.5em;
  cursor: pointer;
}
