/*
 * Bolo - A stable and beautiful blogging system based in Solo.
 * Copyright (c) 2020-present, https://github.com/bolo-blog
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
/*
 * skin style
 *
 * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
*/
@import "../../../scss/reset";
@import "../../../scss/function";
@import "../../../scss/nprogress";
@import "../../../scss/toc";
@import "../../../scss/usite";
@import "icon";
@import "vditor/src/assets/scss/index";

$purple: #7266BA !default;
$purple-dark: #6658b8 !default;
$red: #b94a48 !default;
$black: #3d4450 !default;

.user__site {
  color: rgba(10, 10, 0, 0.7);

  &:hover {
    color: $red;
  }
}

// reset
body {
  cursor: url(../images/cursor.cur), url(../images/cursor.cur), auto
}

a {
  transition: all .3s;
  cursor: url(../images/pointer.cur), url(../images/pointer.cur), auto
}

.vditor-reset {

  img {
    vertical-align: sub;
  }

  &::-webkit-scrollbar {
    display: none;
  }
}

.ft__red {
  color: $red;
}

// module
.module {
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
  transition: all .3s;

  &.item {
    transform: translateY(30px);
    transition: transform 2s cubic-bezier(.175, .885, .32, 1.275);

    &--active {
      transform: translate(0);
    }
  }

  &:hover {
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8);
  }

  &__content {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    color: $black;
    display: block;

    &:hover {
      background-color: #fff;
    }

    &--three {
      padding-bottom: 0;
    }
  }

  &__header {
    background-color: rgba(10, 10, 0, 0.7);
    padding: 15px;
    color: #fff;

    a {
      color: #fff;
    }

    &:hover {
      background-color: rgba(10, 10, 0, 0.9);
    }
  }

  &__list {
    li {
      border-bottom: 1px solid #ddd;
      background-color: rgba(255, 255, 255, 0.8);
      line-height: 20px;

      a {
        padding: 15px 15px;
        display: block;
        color: $black;

        &:hover {
          text-decoration: none;
          color: $red;
          background-color: #fff;
        }
      }
    }
  }
}

// form
.form {
  position: relative;

  &__input {
    border: 1px solid $purple;
    height: 30px;
    line-height: 30px;
    padding: 0 15px;
    border-radius: 15px;
    width: 100%;
    box-sizing: border-box;
  }
}

// bg
.bg {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-image: url(../images/background1.jpg);
  background-size: cover;
  background-position: center center;
  z-index: -1;
  animation: imageAnimation 36s linear infinite 0s;
  opacity: 0;

  &--1 {
    background-image: url(../images/background2.jpg);
    animation-delay: 6s;
  }

  &--2 {
    background-image: url(../images/background3.jpg);
    animation-delay: 12s;
  }

  &--3 {
    background-image: url(../images/background4.jpg);
    animation-delay: 18s;
  }

  &--4 {
    background-image: url(../images/background5.jpg);
    animation-delay: 24s;
  }

  &--5 {
    background-image: url(../images/background6.jpg);
    animation-delay: 30s;
  }
}

@keyframes imageAnimation {
  0% {
    opacity: 0;
    animation-timing-function: ease-in
  }

  8% {
    opacity: 1;
    transform: scale(1.05);
    animation-timing-function: ease-out
  }

  17% {
    opacity: 1;
    transform: scale(1.1) rotate(0deg)
  }

  25% {
    opacity: 0;
    transform: scale(1.1) rotate(0deg)
  }

  100% {
    opacity: 0
  }
}

// header
.header {
  background-color: rgba(10, 10, 0, 0.7);
  height: 50px;
  line-height: 50px;
  color: #fff;
  transition: all .3s;
  box-shadow: 0 0 8px black;

  &:hover {
    background-color: rgba(10, 10, 0, 0.9);
  }

  a {
    color: #fff;
    padding: 0 15px;
    display: inline-block;

    &.current,
    &:hover {
      text-decoration: none;
      background-color: rgba($purple-dark, 0.8);
    }
  }

  &__logo {
    position: absolute;
    left: 30px;
  }

  &__nav {
    text-align: center;

    img {
      float: left;
      height: 20px;
      width: 20px;
      margin: 15px 5px 0 0;
    }
  }

  &__login {
    position: absolute;
    right: 30px;
    top: 0;
  }
}

// framework
.main {
  max-width: 1170px;
  padding: 30px;
  margin: auto;
  display: flex;
}

.content {
  flex: 1;
  min-width: 1px;
}

// side
.side {
  width: 280px;
  min-width: 280px;
  margin-left: 30px;
  border-radius: 5px;

  &::-webkit-scrollbar {
    display: none;
  }

  &__btn {
    background-color: transparent;
    border: 0;
    top: 5px;
    position: absolute;
    right: 10px;
  }

  &__avatar {
    border-radius: 50%;
    height: 100px;
    width: 100px;
    display: block;
    margin: 0 auto;
    margin-bottom: 15px;
    transition: transform .3s;
    margin-top: 10px;

    &:hover {
      transform: rotate(360deg) scale(1.2);
      border: 5px solid rgba($purple, 0.36);
      margin-top: 0;
    }
  }
}

// tag
.tag {
  float: left;
  color: #fff;
  padding: 2px 5px;
  border: 1px solid transparent;
  height: 20px;
  white-space: nowrap;
  word-wrap: normal;
  background-color: rgba(10, 10, 0, 0.7);
  border-radius: 3px 3px 3px 3px;
  line-height: 21px;
  margin: 0 15px 15px 0;

  a {
    color: #fff;
  }

  &:hover {
    background-color: $red;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
    text-decoration: none;
  }
}

.breadcrumb {
  color: $purple !important;

  &:hover {
    color: $black !important;
  }
}

// footer
.footer {
  text-align: center;
  color: #fff;
  padding: 15px;
  margin-bottom: 30px;

  a {
    color: $purple;
  }
}

// article list
.article-list {
  .item {
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    position: relative;
    transition: all .3s, transform 1s cubic-bezier(.175, .885, .32, 1.275);
    transform: perspective(2500px) rotateX(-100deg);

    &--active {
      transform: perspective(2500px) rotateX(0);
    }

    &:hover {
      background-color: #fff;
      box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8);
    }

    .tag {
      float: none;
      display: inline-block;
    }

    &__title {
      text-align: center;
      font-size: 24px;
      font-weight: 500;

      a {
        color: rgba(10, 10, 0, 0.7);
        padding: 0 15px;
        border-radius: 5px;
        display: inline-block;
        margin-bottom: 15px;
        line-height: 36px;

        &:hover {
          color: #fff;
          text-decoration: none;
          background-color: $purple-dark;
        }
      }

      & > sup {
        color: $red;
      }
    }

    &__date {
      position: absolute;
      background-color: $purple;
      color: #fff;
      height: 70px;
      width: 70px;
      font-size: 12px;
      top: -20px;
      border-radius: 35px;
      left: -20px;
      text-align: center;
      padding-top: 9px;
      box-sizing: border-box;
    }

    &__day {
      font-size: 30px;
      display: block;
    }
  }
}

#articlePage .vditor-reset {
  padding-bottom: 15px;
  margin-bottom: -15px;
}

// pagination
.pagination {
  &__item {
    color: #fff;
    border-radius: 3px;
    padding: 0 10px;
    line-height: 24px;
    display: inline-block;
    margin: 0 0 10px 10px;
    background-color: rgba($purple, 0.58);

    &--text {
      background-color: rgba(255, 255, 255, 0.8);
      color: $purple;
    }

    &--current {
      background-color: $purple-dark;
    }
  }

  a.pagination__item:hover {
    text-decoration: none;
    background-color: $purple-dark;
  }
}

// comment
.comments {
  position: relative;

  &__item {
    border-radius: 5px;
    list-style: none;
    margin-bottom: 30px;
    box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2);
    transition: all .3s;

    &:hover {
      box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.8);

      .comments__avatar {
        transform: rotate(720deg);
        border-radius: 0;
      }

      .comments__content {
        background-color: #fff;
      }

      .comments__meta {
        background-color: rgba(217, 237, 247, 1);
      }

      .comments__reply:after {
        background-color: #d9edf7;
      }

    }
  }

  &__meta {
    border-radius: 5px 5px 0 0;
    min-height: 37px;
    line-height: 37px;
    padding-left: 45px;
    background: rgba(217, 237, 247, 0.6);
    color: $black;
    padding-right: 15px;

    a {
      font-weight: 700;
      color: $black;

      &:hover {
        color: $red;
      }
    }

    &--only {
      border-radius: 5px;
    }
  }

  &__content {
    border-radius: 0 0 5px 5px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 45px;
    position: relative;

    textarea {
      margin: 15px 0;
    }
  }

  &__avatar {
    position: absolute;
    height: 54px;
    width: 54px;
    background-position: center center;
    background-size: cover;
    border: 2px solid #fff;
    border-radius: 35px;
    left: -29px;
    top: -23px;
    transition: all .8s ease;
  }

  &__captcha {
    height: 30px;
  }

  &__reply {
    border-radius: 5px;
    margin: 15px auto 0;

    #cancelCommentButton {
      line-height: 34px;
    }

    &:after {
      content: " ";
      position: absolute;
      height: 15px;
      width: 5px;
      right: 60px;
      top: -15px;
      background-color: rgba(217, 237, 247, 0.6);
    }
  }
}

.comment-body-ref {
  right: 0;
  position: absolute;
  left: 64px;

  .breadcrumb {
    display: none;
  }
}

.form {
  width: 100%;

  input,
  textarea {
    border: 1px solid #d1d5da;
    background-color: #fafafa;
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(27, 31, 35, .075);
    padding: 7px 8px;
    width: 100%;
    line-height: 17px;
    box-sizing: border-box;

    &:focus {
      background-color: #fff;
      box-shadow: inset 0 1px 2px rgba(27, 31, 35, .075), 0 0 0 0.2em #dbedff;
      border: 1px solid #4285f4;
    }
  }

  .ft__red {
    line-height: 34px;
  }

  .btn {
    float: right;
    height: 34px;
    margin: 0 0 0 10px;
    padding: 0 15px;
  }
}

.icon__up {
  position: fixed;
  bottom: 30px;
  right: 30px;
  color: #fff;
  background-color: rgba($purple, 0.8);
  height: 30px;
  width: 30px;
  line-height: 28px;
  border-radius: 15px;
  cursor: pointer;
  display: none;
  text-align: center;

  &:hover {
    background-color: $purple-dark;
  }
}

.article__relevant {
  margin-bottom: 30px;

  .module {
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .mobile__hidden {
    display: none;

    &.fn__none {
      display: block;
    }
  }

  .main {
    display: block;
    margin: 15px;
    padding: 0;
  }

  .side {
    margin: 0;
    width: auto;
  }

  .article-list {
    overflow: hidden;

    .item {
      &__title {
        font-size: 20px;
      }

      &__date--m {
        text-align: center;
        margin-bottom: 10px;
        color: $black;
        display: block;
      }

      &__date {
        display: none;
      }
    }
  }

  .article-list .item,
  .module,
  .comments__item {
    margin-bottom: 15px;
  }

  .footer {
    margin: 0 15px 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    color: $black;
    line-height: 20px;

    a {
      text-decoration: underline;
    }

    .fn__none--m {
      display: none;
    }

    .fn__none {
      display: block;
    }
  }

  .tag {
    margin: 0 5px 10px 0;
    font-size: 12px;
  }

  .header__logo {
    left: 0;
  }

  .header__login {
    display: none;
  }

  .header__m {
    display: block;
    position: absolute;
    width: 100%;
    z-index: 1;

    img {
      float: left;
      height: 20px;
      width: 20px;
      margin: 0 5px 0 0;
    }

    a.current {
      color: #b94a48;
    }

    .icon__more,
    .icon__list {
      position: absolute;
      top: -35px;
      right: 15px;
      font-size: 20px;
      color: #fff;
    }

    .icon__list {
      right: 50px;
    }

    .module__list {
      display: none;

      li {
        background-color: #fff;
      }
    }
  }

  .module__content.ft__center {
    text-align: left;
  }

  .comments__avatar {
    height: 34px;
    width: 34px;
    left: -7px;
  }

  .comments__content {
    padding: 15px;
  }

  .vditor-reset {
    font-size: 14px;
  }

  .article__relevant {
    display: block;
    margin-bottom: 0;

    .module {
      margin-bottom: 15px;
    }
  }

  .article__near a {
    display: block;
    float: none;
  }
}