/**
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

body {
  padding: 0;
  margin: 0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

header {
  margin: 30px 30px 0 30px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #AAA;
}

section {
  display: block;
  overflow: hidden;
  margin: 30px;
}

.noflex h4 {
  margin: 0;
}
section+section {
  margin-top: 0;
}

.hbox {
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;

  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;

  display: box;
  box-orient: horizontal;
  box-align: stretch;
}

.slide,
.vbox {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;

  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;

  display: box;
  box-orient: vertical;
  box-align: stretch;
}

.flex {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
}

section,
.noflex {
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  box-flex: 0;
}

.slide,
.boxcenter {
  -webkit-box-pack: center;
  -moz-box-pack: center;
  box-pack: center;
}

.boxstart {
  -webkit-box-pack: start;
  -moz-box-pack: start;
  box-pack: start;
}

.hcenter {
  text-align: center;
}

.presentation {
  position: absolute;
  width: 100%;
  display: table-cell;
  vertical-align: middle;
  height: 100%;
}

.slides {
  width: 100%;
  height: 100%;
  overflow: hidden;
  left: 0;
  top: 0;
  position: absolute;
  display: none;
  -webkit-transition: -webkit-transform 1.5s ease-in-out;
  -moz-transition: -moz-transform 1.5s ease-in-out;
  -o-transition: -moz-transform 1.5s ease-in-out;
}

.slide {
  position: absolute;
  overflow: hidden;
  width: 900px;
  height: 700px;
  left: 50%;
  top: 50%;
  margin-top: -350px;
  border-radius: 10px;
  -moz-border-radius: 10px;
  opacity: 0.35;

  -webkit-transform: scale(0.9) translateZ(0);
  -moz-transform: scale(0.9);
  -o-transform: scale(0.9);

  -webkit-transition-property: margin, -webkit-transform, opacity;
  -webkit-transition-duration: 0.3s, 0.3s, 0.3s;
  -webkit-transition-timing-function: ease-in-out;

  -moz-transition-property: margin, -moz-transform, opacity;
  -moz-transition-duration: 0.3s, 0.3s, 0.3s;
  -moz-transition-timing-function: ease-in-out;

  -o-transition-property: margin, -moz-transform, opacity;
  -o-transition-duration: 0.3s, 0.3s, 0.3s;
  -o-transition-timing-function: ease-in-out;

  /* NOTE(slightlyoff): simpler animations for slower boxes */
  /*
  -webkit-transition: margin 0.3s ease-in-out;
  -moz-transition: margin 0.3s ease-in-out;
  -o-transition: margin 0.3s ease-in-out;
  */

  /* TODO(ericbidelman): WARNING: slide_white.png bg slows done transitions */
  /*background: url('../images/bgs/bottom_bar.png') left bottom no-repeat,
              white url('../images/bgs/slide_white.png') center center repeat-y;
  background-size: contain, contain;
  -moz-background-size: contain, contain;*/
  background: #eee url('../images/bgs/bottom_bar.png') left bottom no-repeat;
  background-size: contain;
  -moz-background-size: contain;
}

.slide:nth-of-type(even) {
  border-radius: 10px 30px 10px 30px;
  -moz-border-radius: 10px 20px 10px 20px;
}

.slide:nth-of-type(odd) {
  border-radius: 20px 10px 20px 10px;
  -moz-border-radius: 20px 10px 20px 10px;
}

.slide:not(.transitionSlide) > section:last-of-type {
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
}

.generic .slide.far-far-past {
  display: none;
  margin-left: -2400px;
}

.generic .slide.far-past {
  display: block;
  margin-left: -2400px;
}

.generic .slide.past {
  visibility: visible;
  display: block;
  margin-left: -1400px;
}

.generic .slide.current {
  visibility: visible;
  display: block;
  margin-left: -450px;
  -webkit-transform: scale(1.0);
  -moz-transform: scale(1.0);
  -o-transform: scale(1.0);
  opacity: 1.0;
}

.generic .slide.future {
  visibility: visible;
  display: block;
  margin-left: 500px;
}

.generic .slide.far-future {
  display: block;
  margin-left: 1500px;
}

.generic .slide.far-far-future {
  margin-left: 1500px;
  display: none;
}

.composited .slide {
  -webkit-transition-property: -webkit-transform, opacity;
  -webkit-transition-duration: 0.3s, 0.3s;
}

.composited .slide.far-far-past {
  display: none;
}

.composited .slide.far-past {
  -webkit-transform: translate3d(-2400px,0,0) scale(0.8);
}
.composited .slide.past {
  -webkit-transform: translate3d(-1400px,0,0) scale(0.8);
}
.composited .slide.current {
  opacity: 1;
  -webkit-transform: translate3d(-450px,0,0) scale(1.0);
}
.composited .slide.future {
  -webkit-transform: translate3d(500px,0,50px) scale(0.8);
}
.composited .slide.far-future {
  -webkit-transform: translate3d(1500px,0,0) scale(0.8);
}
.composited .slide.far-far-future {
  display: none;
}

/* Effects */
body.three-d .presentation {
  -webkit-transform: 0;
  -webkit-transform-style: preserve-3d;
  -webkit-perspective: 600;
}

body.three-d .slides {
  -webkit-perspective: 600;
  -webkit-transform-style: preserve-3d;
  -webkit-transform: translateX(50px) scale(0.8) rotateY(15deg);
}

