/**
 *
 * Copyright 2016 Google Inc. All rights reserved.
 *
 * 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.
 */

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
  background: #FAFAFA;
  font-family: Arial, sans-serif;
}

.header {
  width: 100%;
  height: 156px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  background: #333;
  color: #FFF;
  display: flex;
  flex-direction: row;
  padding: 20px;
}

.header__menu-toggle {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  color: #FFF;
}

.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.side-nav--visible {
  pointer-events: auto;
}

.side-nav::before {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  will-change: opacity;
  transition: opacity 0.3s cubic-bezier(0,0,0.3,1);
}

.side-nav__container {
  position: relative;
  opacity: .9;
  width: 25%;
  max-width: 400px;
  background-color: #f2efec;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2313b09b' fill-opacity='0.29'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-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0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  height: 100%;
  box-shadow: 2px 0 12px rgba(0,0,0,0.4);
  transform: translateX(-102%);
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.side-nav--animatable .side-nav__container {
  transition: transform 0.23s cubic-bezier(0,0,0.3,1);
}

.side-nav--visible.side-nav--animatable .side-nav__container {
  transition: transform 0.33s cubic-bezier(0,0,0.5,1);
}

.side-nav--visible::before {
  opacity: 1;
}

.side-nav--visible .side-nav__container {
  transform: none;
}

.side-nav__hide {
  position: absolute;
  left: 16px;
  top: 16px;
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
}

.side-nav__header {
  height: 107px;
  background: #43EBC7;
  display: flex;
  padding: 16px;
  align-items: flex-end;
  font-size: 24px;
}

.side-nav__content {
  padding-top: 32px;
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.side-nav__content li {
  height: 50px;
  line-height: 50px;
  padding: 16px 16px;
  overflow: auto;
}

.side-nav__content li:hover {
  background: #CCC;
}
