/* https://mozilla.github.io/brick/download.html?byob=x-tag-core,brick-common,x-tag-flipbox */ 


x-flipbox {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  display: block;
  position: relative;
  height: 100%;
  width: 100%;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
x-flipbox > * {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -ms-backface-visibility: hidden;
  -o-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transition-property: -webkit-transform;
  -moz-transition-property: -moz-transform;
  -ms-transition-property: -ms-transform;
  -o-transition-property: -o-transform;
  transition-property: transform;
  -webkit-transition-duration: 0.25s;
  -moz-transition-duration: 0.25s;
  -ms-transition-duration: 0.25s;
  -o-transition-duration: 0.25s;
  transition-duration: 0.25s;
  -webkit-transition-timing-function: linear;
  -moz-transition-timing-function: linear;
  -ms-transition-timing-function: linear;
  -o-transition-timing-function: linear;
  transition-timing-function: linear;
  -webkit-transition-delay: 0s;
  -moz-transition-delay: 0s;
  -ms-transition-delay: 0s;
  -o-transition-delay: 0s;
  transition-delay: 0s;
/* DO NOT ERASE THESE TRANSFORM-STYLES; they fix a flickering issue in FFOS*/
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -ms-transform-style: preserve-3d;
  -o-transform-style: preserve-3d;
  transform-style: preserve-3d;
}
x-flipbox > *:first-child {
  -webkit-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 2px);
  -moz-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 2px);
  -ms-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 2px);
  -o-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 2px);
  transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 2px);
  z-index: 2;
}
x-flipbox > *:last-child {
  -webkit-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 1px);
  z-index: 1;
}
x-flipbox[_anim-direction="up"] > *:first-child,
x-flipbox[_anim-direction="down"] > *:first-child {
  -webkit-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 2px);
  -moz-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 2px);
  -ms-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 2px);
  -o-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 2px);
  transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 2px);
}
x-flipbox[_anim-direction="up"] > *:last-child {
  -webkit-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 1px);
}
x-flipbox[_anim-direction="down"] > *:last-child {
  -webkit-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 1px);
}
x-flipbox[flipped]:after {
/* DO NOT ERASE THIS :after SELECTOR */
  content: "";
  display: none;
}
x-flipbox[flipped] > *:first-child {
  -webkit-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 2px);
  -moz-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 2px);
  -ms-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 2px);
  -o-transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 2px);
  transform: perspective(800px) rotateY(180deg) translate3d(0px, 0px, 2px);
  z-index: 1;
}
x-flipbox[flipped] > *:last-child {
  -webkit-transform: perspective(800px) rotateY(360deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateY(360deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateY(360deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateY(360deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateY(360deg) translate3d(0px, 0px, 1px);
  z-index: 2;
}
x-flipbox[_anim-direction="left"][flipped] > *:first-child {
  -webkit-transform: perspective(800px) rotateY(-180deg) translate3d(0px, 0px, 2px);
  -moz-transform: perspective(800px) rotateY(-180deg) translate3d(0px, 0px, 2px);
  -ms-transform: perspective(800px) rotateY(-180deg) translate3d(0px, 0px, 2px);
  -o-transform: perspective(800px) rotateY(-180deg) translate3d(0px, 0px, 2px);
  transform: perspective(800px) rotateY(-180deg) translate3d(0px, 0px, 2px);
}
x-flipbox[_anim-direction="left"][flipped] > *:last-child {
  -webkit-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateY(0deg) translate3d(0px, 0px, 1px);
}
x-flipbox[_anim-direction="up"][flipped] > *:first-child {
  -webkit-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 2px);
  -moz-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 2px);
  -ms-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 2px);
  -o-transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 2px);
  transform: perspective(800px) rotateX(180deg) translate3d(0px, 0px, 2px);
}
x-flipbox[_anim-direction="up"][flipped] > *:last-child {
  -webkit-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
}
x-flipbox[_anim-direction="down"][flipped] > *:first-child {
  -webkit-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 2px);
  -moz-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 2px);
  -ms-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 2px);
  -o-transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 2px);
  transform: perspective(800px) rotateX(-180deg) translate3d(0px, 0px, 2px);
}
x-flipbox[_anim-direction="down"][flipped] > *:last-child {
  -webkit-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  -moz-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  -ms-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  -o-transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
  transform: perspective(800px) rotateX(0deg) translate3d(0px, 0px, 1px);
}
