/*!
 * The MIT License (MIT)
 *
 * Copyright (c) 2020 Karl STEIN
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
@import "./variables";

.cc-component.cc-closable .btn-close {
  cursor: pointer;
  display: inline-block;
  line-height: normal;
}

.cc-component.closed {
  transition-duration: $anim-close-duration;
  transition-timing-function: $anim-close-curve;
}

.cc-component.opened {
  transition-duration: $anim-open-duration;
  transition-timing-function: $anim-open-curve;
}

// Fade

.cc-anim-fade.closed {
  opacity: 0 !important;
}

.cc-anim-fade.opened {
  opacity: 1 !important;
}

// Resize

.cc-anim-resize.closed {
  -webkit-transform: perspective(1000px) scale(0.8) !important;
  -moz-transform: perspective(1000px) scale(0.8) !important;
  -ms-transform: perspective(1000px) scale(0.8) !important;
  -o-transform: perspective(1000px) scale(0.8) !important;
  transform: perspective(1000px) scale(0.8) !important;
}

.cc-anim-resize.opened {
  -webkit-transform: scale(1) !important;
  -moz-transform: scale(1) !important;
  -ms-transform: scale(1) !important;
  -o-transform: scale(1) !important;
  transform: scale(1) !important;
}

// Slide

.cc-anim-slide.aligned-bottom.closed,
.cc-anim-slide-y.aligned-bottom.closed {
  bottom: -100% !important;
}

.cc-anim-slide.aligned-bottom.opened,
.cc-anim-slide-y.aligned-bottom.opened {
  bottom: 0 !important;
}

.cc-anim-slide.aligned-left.closed,
.cc-anim-slide-x.aligned-left.closed {
  left: -100% !important;
}

.cc-anim-slide.aligned-left.opened,
.cc-anim-slide-x.aligned-left.opened {
  left: 0 !important;
}

.cc-anim-slide.aligned-right.closed,
.cc-anim-slide-x.aligned-right.closed {
  right: -100% !important;
}

.cc-anim-slide.aligned-right.opened,
.cc-anim-slide-x.aligned-right.opened {
  right: 0 !important;
}

.cc-anim-slide.aligned-top.closed,
.cc-anim-slide-y.aligned-top.closed {
  top: -100% !important;
}

.cc-anim-slide.aligned-top.opened,
.cc-anim-slide-y.aligned-top.opened {
  top: 0 !important;
}

// Zoom

.cc-anim-zoom.closed {
  -webkit-transform: scale(0) !important;
  -moz-transform: scale(0) !important;
  -ms-transform: scale(0) !important;
  -o-transform: scale(0) !important;
  transform: scale(0) !important;
}

.cc-anim-zoom.opened {
  -webkit-transform: scale(1) !important;
  -moz-transform: scale(1) !important;
  -ms-transform: scale(1) !important;
  -o-transform: scale(1) !important;
  transform: scale(1) !important;
}
