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

.summit-dialog-panel-container {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);

  will-change: opacity;
  -webkit-backface-visibility: hidden;
  opacity: 0;
  pointer-events: none;

  -webkit-transition: opacity 0.5s cubic-bezier(0.0, 0.0, 0.2, 1) 0.2s;
  transition: opacity 0.5s cubic-bezier(0.0, 0.0, 0.2, 1) 0.2s;
}

.summit-dialog-panel {
  width: 100%;
  max-width: 300px;
  border-radius: 2px;
  background: #FFF;
  padding: 24px 24px 16px 24px;
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: 0;

  will-change: opacity, transform;
  -webkit-backface-visibility: hidden;

  -webkit-transform: translate(-50%, -50%) translateY(15px);
  transform: translate(-50%, -50%) translateY(15px);

  -webkit-transition: -webkit-transform 0.15s cubic-bezier(0.0, 0.0, 0.2, 1),
      opacity 0.15s cubic-bezier(0.0, 0.0, 0.2, 1);
  transition: transform 0.15s cubic-bezier(0.0, 0.0, 0.2, 1),
      opacity 0.15s cubic-bezier(0.0, 0.0, 0.2, 1);

  @include shadow-z4();
}

.summit-dialog-buttons {
  height: 36px;
  line-height: 36px;
}

.summit-dialog-button {
  @include button();
  @include typo-button();
  margin: 0;
  background: none;
  float: right;
}

.summit-dialog-button.primary {
  color: $color-accent;
  padding-right: 16px;
}

.summit-dialog-panel-content {
  padding-bottom: 24px;
}

.summit-dialog-title {
  @include typo-title();
  padding-bottom: 24px;
  letter-spacing: 0;
}

.summit-dialog-panel-container.active {
  pointer-events: auto;
  opacity: 1;

  -webkit-transition: opacity 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) 0.1s;
  transition: opacity 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) 0.1s;
}

.summit-dialog-panel-container.active .summit-dialog-panel {
  opacity: 1;
  transform: translate(-50%, -50%);

  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) 0.2s,
      opacity 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) 0.2s;
  transition: transform 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) 0.2s,
      opacity 0.3s cubic-bezier(0.0, 0.0, 0.2, 1) 0.2s;
}

@media(min-width: 356px) {
  .summit-dialog-panel {
    max-width: 320px;
  }
}
