.notfound {
  font-size: 26px;
  font-weight: normal;
  padding: 0;
  color: #888;
}

.flexbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.divider {
  border-bottom: solid 1px @border-color;
  height: 0;
  padding: 0;
  margin: 0.2rem 0;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heading {
  margin-bottom: 20px;
  padding: 1em 0;
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    position: relative;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    line-height: 1.5em;
  }
  &.heading-bullet {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      &:before {
        content: '';
        background: @border-color;
        display: inline-block;
        width: 5px;
        height: 1em;
        margin-right: 0.5em;
        margin-top: -0.15em;
        vertical-align: middle;
      }
    }
  }
  &.heading-line {
    position: relative;
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      background: #fff;
      z-index: 1;
      display: inline-block;
      padding: 0 1em 0 0;
    }
    &:before {
      content: '';
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      margin-top: -1px;
      border-bottom: solid 1px @border-color;
      z-index: 0;
    }
    &.text-left {
      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        padding: 0 1em 0 0;
      }
    }
    &.text-right {
      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        padding: 0 0 0 1em;
      }
    }
    &.text-center {
      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        padding: 0 1em;
      }
    }
  }
  &.heading-divider {
    border-bottom: solid 1px @border-color;
  }
}

.blockquote {
  margin: 0 0 1rem 0;
  padding: 0;
  font-size: 1.2rem;
  border: none;
  footer {
    margin-top: 0.2rem;
    font-size: 0.8em;
    color: fade(@font-color, 60%);
    &:before {
      content: '\2014 \00A0';
    }
  }
}

.or-line {
  position: relative;
  height: 20px;
  margin: 10px 0;
  &:before {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    content: '';
  }
  &:after {
    content: 'OR';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #888;
    padding: 0 15px;
  }
}

.thumb {
  position: relative;
  margin: auto;
  text-align: center;
  img {
    max-width: 100%;
    max-height: 100%;
    transition: all 0.3s ease-in-out;
  }

  &.cover {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    img {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      transition: all 0.3s ease-in-out;
      min-width: 100%;
      min-height: 100%;
      max-height: 150%;
      max-width: 150%;
    }
    &.p6x4 {
      padding-bottom: 66%;
    }
    &.p5x4 {
      padding-bottom: 80%;
    }
    &.p5x3 {
      padding-bottom: 60%;
    }
    &.p4x3 {
      padding-bottom: 75%;
    }
    &.p16x9 {
      padding-bottom: 56%;
    }
  }
}

.advert {
  white-space: nowrap;
  text-align: center;
  .advert-kv {
    display: inline-block;
    text-align: left;
    .kv-image {
      text-align: center;
      img {
        max-width: 100%;
        max-height: 100%;
      }
    }
    .kv-text {
      position: absolute;
      left: 50%;
      // right: 0;
      top: 50%;
      // bottom: 0;
      transform: translate(-50%, -50%);
      // opacity: 0;
      text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
      color: #fff;
      big {
        display: block;
        font-weight: bold;
        font-size: 3rem;
      }
      small {
        display: block;
        font-size: 1.5rem;
        white-space: normal;
      }
    }
  }
}

.scrollbar {
  overflow-y: auto;
  /* 滚动条样式 */
  &::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }
  &::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    -webkit-border-radius: 10px;
    border-radius: 10px;
  }
  &::-webkit-scrollbar-track-piece {
  }
  &::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
  }
}

.swiper {
  position: relative;
  overflow: hidden;
  z-index: 0;
  &:hover {
    .swiper-button-prev,
    .swiper-button-next {
      opacity: 1;
    }
  }
  .swiper-slide {
    overflow: hidden;
    img,
    video,
    svg {
      max-width: 100%;
      max-height: 100%;
    }
  }
  .swiper-container {
    height: 100%;
  }

  .swiper-button-prev,
  .swiper-button-next {
    top: 0;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 100%;
    z-index: 1;
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.15s ease-in-out;
    outline: none;
    background: none;
    opacity: 0.2;
    &.swiper-button-disabled {
      pointer-events: auto;
      &:before {
        opacity: 0.2;
      }
    }
    &:after {
      position: absolute;
      left: 0;
      right: -300%;
      top: 0;
      bottom: 0;
      content: '';
      z-index: 1;
      background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
      opacity: 0.6;
      transition: all 0.3s ease-in-out;
    }
    &:before {
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 2;
      content: ' ';
      display: block;
      width: 2em;
      height: 2em;
      border: solid #fff;
      border-width: 0 0 2px 2px;
      box-shadow: none;
      transform: translate(-50%, -50%) rotate(45deg);
      margin-left: 0.5em;
      opacity: 1;
      transition: all 0.3s ease-in-out;
    }
  }
  .swiper-button-next {
    left: auto;
    right: 0;
    &:before {
      margin-left: -0.5em;
      border-width: 2px 2px 0 0;
    }
    &:after {
      position: absolute;
      left: -300%;
      right: 0;
      background: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
    }
  }
  .swiper-pagination {
    .swiper-pagination-bullet {
      border: solid 1px #fff;
      width: 12px;
      height: 12px;
      background: #000;
    }
    .swiper-pagination-bullet-active {
      background: @primary-color;
    }
  }
}

.gallery {
  margin-bottom: 20px;
  overflow: hidden;
  .gallery-top {
    .swiper-container {
      // margin: 0 -500px;
      .swiper-wrapper {
        .swiper-slide {
          background: #ddd;
          opacity: 0.5;
          // max-width: 90%;
          // transform: translateX(10%);
          &.swiper-slide-active {
            opacity: 1;
          }
        }
      }
    }
    .swiper-controls {
      .swiper-button-prev,
      .swiper-button-next {
        cursor: pointer;
        font-size: 0.8rem;
        &:before {
          border-color: #fff;
        }
      }
    }
  }
  .gallery-thumbs {
    margin-top: 10px;
    padding: 0 30px;
    .swiper-container {
      .swiper-wrapper {
        .swiper-slide {
          background: #ddd;
          border: solid 2px #ddd;
          border-radius: 4px;
          position: relative;
          cursor: pointer;
          transition: all 0.2 ease-in-out;
          &:after {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            content: '';
            background: #fff;
            opacity: 0.6;
            transition: all 0.2 ease-in-out;
          }
          &.swiper-slide-thumb-active {
            border-color: @primary-color;
            &:after {
              opacity: 0;
            }
          }
        }
      }
    }
    .swiper-controls {
      .swiper-button-prev,
      .swiper-button-next {
        cursor: pointer;
        background: none;
        top: 0;
        bottom: 0;
        width: 25px;
        height: auto;
        transform: translateY(0);
        background: #eee;
        border-radius: 0;
        font-size: 0.4rem;
        opacity: 0.8;
        &:hover,
        &:focus {
          border: none;
          box-shadow: none;
        }
        &:before {
          border-color: #000;
        }
        &:after {
          display: none;
        }
      }
      .swiper-button-prev {
        left: 0;
      }
      .swiper-button-next {
        right: 0;
      }
    }
  }
}

.lightbox-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: 99999;
  user-select: none;
  -webkit-user-select: none;
  .lightbox-mask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: fade(#000, 95%);
  }
  .lightbox-container {
    height: 100%;
    .ajax-result {
      max-height: 100vh;
      overflow-y: auto;
      /* 滚动条样式 */
      &::-webkit-scrollbar {
        width: 5px;
        height: 5px;
      }
      &::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.8);
        -webkit-border-radius: 10px;
        border-radius: 10px;
      }
      &::-webkit-scrollbar-thumb {
        -webkit-border-radius: 10px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.4);
      }
    }
    img,
    svg,
    video,
    .ajax-result {
      position: absolute;
      z-index: 2;
      max-width: 100%;
      max-height: 100%;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: #000;
    }
    video {
      min-width: 600px;
      min-height: 400px;
      max-height: 80%;
      max-width: 80%;
    }
    // .swiper-slide {
    // 	position: relative;
    // }
  }
  .lightbox-close {
    position: absolute;
    right: 2rem;
    top: 2rem;
    width: 1em;
    height: 1em;
    z-index: 99999;
    display: block;
    font-size: 30px;
    cursor: pointer;
    // background: fade(#000, 80%);
    transition: all 0.2s linear;
    &:before {
      content: ' ';
      position: absolute;
      left: 5%;
      right: 5%;
      top: 50%;
      border-bottom: solid 1px #fff;
      transform: rotate(-45deg);
    }
    &:after {
      content: ' ';
      position: absolute;
      left: 5%;
      right: 5%;
      top: 50%;
      border-bottom: solid 1px #fff;
      transform: rotate(45deg);
    }
    &:hover {
      transform: rotate(180deg);
    }
  }
  .lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 1em;
    height: 1em;
    margin-left: -0.5em;
    margin-top: -0.5em;
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    border-left: 1px solid #000;
    border-radius: 50%;
    animation: spinner 700ms infinite linear;
    zoom: 1;
    font-size: 30px;
  }
}

.pagination {
  position: relative;
  z-index: 0;
  text-align: center;
  li {
    a {
      border-radius: 4px;
      background: #f0f0f0;
      border: none;
      margin: 0 5px;
      font-size: 1.15rem;
      &.next-page,
      &.prev-page {
        border: none;
        &:hover {
          background: fade(@vi-color, 15%);
          border: none;
        }
      }
    }
    a,
    span {
      padding: 5px 13px;
      color: #333;
    }
    &.active {
      a,
      span {
        // border-color: @vi-color;
        background: @vi-color;
        font-weight: bold;
        color: #fff;
      }
    }
    &:first-child a,
    &:last-child a {
      border-radius: 4px;
    }
  }
}

.card {
  display: block;
  margin-bottom: 15px;
  overflow: hidden;
  &.card-flex {
    display: flex;
    justify-content: space-between;
    .card-img,
    .card-body {
      padding: 0;
    }
    .card-body {
      flex: 1;
    }
  }
  .card-img {
    position: relative;
    .thumb {
      width: 100%;
    }
    .date {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 1;
      background: rgba(0, 0, 0, 0.6);
      text-align: center;
      padding: 10px;
      color: #fff;
      big,
      small {
        line-height: 1em;
        display: block;
      }
      big {
        font-weight: bold;
        font-size: 2em;
      }
      small {
        font-size: 0.8em;
      }
    }
  }
  .card-body {
    position: relative;
    padding: 10px 0;
    .title {
      font-size: 1.15em;
    }
    .date {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 1;
      background: rgba(0, 0, 0, 0.6);
      text-align: center;
      padding: 10px;
      color: #fff;
      big,
      small {
        line-height: 1em;
        display: block;
      }
      big {
        font-weight: bold;
        font-size: 2em;
      }
      small {
        font-size: 0.8em;
      }
    }
    .summary {
      margin-top: 10px;
      line-height: 1.8em;
      max-height: 5.4em;
      overflow: hidden;
      opacity: 0.7;
    }
  }
}

.upload-image-plugin,
.upload-file-plugin {
  .uploadify-queue {
    position: absolute;
    right: 0;
    z-index: 999;
    min-width: 400px;
    background: #fff;
    .uploadify-queue-item {
      position: relative;
      border-radius: 3px;
      font: 11px Verdana, Geneva, sans-serif;
      margin-top: 5px;
      padding: 30px 10px 10px 10px;
      // border: solid 1px #ddd;
      box-shadow: 0 0 15px #ccc;
      display: flex;
      justify-content: space-between;

      .uploadify-progress {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 10px;
        background-color: #e5e5e5;
        margin: 5px 0;
        // width: 100%;
        .uploadify-progress-bar {
          background-color: @primary-color;
          height: 3px;
          width: 1px;
        }
      }
    }
  }
}

.upload-image-plugin {
  .uploadify-image {
    border: dashed 1px #ccc;
    background: #f6f6f6;
    height: 100px;
    width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .uploadify-button {
    border: dashed 1px #ccc;
    background: #f6f6f6;
    min-height: 100px;
    min-width: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    color: #333;
    &.uploadify-image {
      padding: 0;
    }
  }
}

.upload-file-plugin {
  display: flex;
  align-items: center;
  border: solid 1px #ddd;
  padding: 2px 20px 2px 4px;
  border-radius: 3px;
  input {
    border: none;
    flex: 1;
  }
  .regex-tip {
    transform: translateY(16px);
  }
}
