/*!
 * Previewer v@VERSION
 * https://github.com/fengyuanchen/previewer
 *
 * Copyright (c) 2014-@YEAR Fengyuan Chen
 * Released under the MIT license
 *
 * Date: @DATE
 */

.previewer-open {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;

  > * {
    display: none !important;
  }

  > .previewer-container {
    display: block !important;
  }
}

.previewer-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20140520; // Create day
  background-color: #fcfcfc;
  overflow: auto;

  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;

  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;

  *,
  *:before,
  *:after {
      -webkit-box-sizing: border-box;
         -moz-box-sizing: border-box;
              box-sizing: border-box;
  }
}

.previewer-mainbody {
  height: 100%;
  margin-left: 60px;

  > iframe {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    border: 0;
    overflow: hidden;
  }
}

.previewer-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 61px;
  background-color: #fff;
  border-right: 1px solid #fcfcfc;

  > button {
    display: block;
    width: 60px;
    height: 60px;
    padding: 0;
    color: #333;
    font-size: 30px;
    line-height: normal;
    background-image: none;
    background-color: #fff;
    border: 0;
    opacity: .2;
    filter: alpha(opacity=20);

    &:hover,
    &:focus {
      opacity: .5;
      filter: alpha(opacity=50);
      outline: none;
    }
  }
}

.previewer-nav {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;

  > li > a {
    display: block;
    height: 60px;
    padding: 10px;
    border: 1px solid transparent;
    cursor: pointer;

    &:hover,
    &:focus,
    &.active {
      border-left-color: #69f;
      background-color: #fcfcfc;
    }

    &.active {
      cursor: default;
    }

    > i {
      position: relative;
      display: block;

      &:before,
      &:after {
        position: absolute;
        display: block;
        border: 1px solid #333;
        content: " ";
      }
    }

    &[data-preview="phone"] > i {
      margin: 0 8px;
      width: 24px;
      height: 40px;
      border: 1px solid #333;

      &:before {
        top: 3px;
        left: 1px;
        width: 20px;
        height: 29px;
      }

      &:after {
        bottom: 1px;
        left: 10px;
        width: 4px;
        height: 4px;
      }
    }

    &[data-preview="tablet"] > i {
      margin: 0 5px;
      width: 30px;
      height: 40px;
      border: 1px solid #333;

      &:before {
        top: 3px;
        left: 2px;
        height: 29px;
        width: 24px;
      }

      &:after {
        bottom: 1px;
        left: 12px;
        height: 4px;
        width: 4px;
      }
    }

    &[data-preview="laptop"] > i {
      margin: 9px 0;
      width: 40px;
      height: 22px;
      border-bottom: 1px solid #333;

      &:before {
        bottom: 3px;
        left: 4px;
        width: 32px;
        height: 18px;
      }

      &:after {
        display: none;
      }
    }

    &[data-preview="desktop"] > i {
      margin: 5px;
      width: 30px;
      height: 30px;
      border-bottom: 1px solid #333;

      &:before {
        top: 0;
        left: -5px;
        width: 40px;
        height: 24px;
      }

      &:after {
        bottom: 2px;
        left: 10px;
        width: 10px;
        height: 1px;
        border-width: 0;
        background-color: #333;
      }
    }
  }
}
