/**
 * Copyright 2014 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.
 */

.schedule .card__container {
  background: $color-primary;

  &:after, &:before {
    background: $color-primary;
  }
}

.schedule .card__logo {
  width: 112px;
  height: 112px;
  left: calc(50% - 36px);
  top: calc(50% - 30px);
  background: url(../images/icon-schedule.svg) top left no-repeat;
  background-size: contain;
}

.schedule.card--expanded {
  .card__logo {
    width: 112px;
    height: 112px;
    left: calc(50% - 36px);
    top: 90px;
    opacity: 1;
  }

  .card__color-block {
    height: 208px;
  }
}

.schedule__overview-container {
  display: none;
  transition: opacity 0.33333s cubic-bezier(0,0,0.21,1) 0.2s;
  opacity: 1;
  pointer-events: none;
}

.schedule__overview-container canvas {
  pointer-events: none;
}

.schedule__overview-container--hidden {
  transition: opacity 0.13333s cubic-bezier(0,0,0.21,1);
  opacity: 0;
}

.schedule .card__content-wrapper {
  padding: 16px;
  border-top: 136px solid $color-primary;
}

.schedule__day {

  position: relative;
  margin-bottom: 40px;
  will-change: transform;

  & > h1 {
    @include typo-base();
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    color: $color-primary;
    margin-bottom: 16px;
    padding-top: 20px;
  }

  &:after {
    content: '';
    width: 48px;
    height: 48px;
    background: url(../images/icon-schedule-gray.svg) center center no-repeat;
    background-size: contain;
    top: 86px;
    left: 10px;
    position: absolute;
    will-change: opacity;
  }
}

.schedule__block {
  padding: 16px 0;
  margin: 0 0 0 56px;
  border-bottom: 1px solid rgba(33,33,33,0.1);
}

.schedule__block-title {
  font-weight: 300;
  font-size: 16px;
}

.schedule__block-time {
  opacity: 0.56;
}

@media (min-width: 475px) {
  .schedule .card__logo {
    width: 142px;
    height: 142px;
    left: calc(50% - 46px);
    top: calc(50% - 40px);
  }
}

@media (min-width: 600px) {
  .schedule {
    float: none;
    width: 100%;
    height: 296px;
    margin-bottom: 4px;
  }

  .schedule .card__container {
    margin: 0 0 4px 0;
  }

  .schedule__overview-container,
  .schedule canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
  }

  .schedule__day-1,
  .schedule__day-2 {
    @include typo-base();
    position: absolute;
    font-weight: 400;
    color: #FFF;
    font-size: 18px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: auto;
  }

  .schedule__day-1 {
    right: 106px;
    top: 16px;
  }

  .schedule__day-2 {
    right: 40px;
    top: 16px;
  }

  .schedule__day-1--inactive,
  .schedule__day-2--inactive {
    color: rgba(255, 255, 255, 0.4);
  }

  .schedule .card__logo {
    opacity: 0;
  }
}

@media (min-width: 900px) {

  .schedule .card__content-wrapper {
    top: 340px;
    border-top: 136px solid darken($color-primary, 8%);
  }
}

@media (min-width: 960px) {
  .schedule {
    margin: 0;
  }
}
