@import '../../../../lib/style/themes/default';
@import '../../../../lib/style/mixins/index';

@picture-viewer-prefix-cls: ~'@{c7n-pro-prefix}-picture-viewer';

.@{picture-viewer-prefix-cls} {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  user-select: none;

  &-modal {
    &-mask.@{c7n-pro-prefix}-mask {
      background-color: rgba(0, 0, 0, 0.65);
    }

    .@{c7n-pro-prefix}-modal {
      &-content {
        background-color: transparent;
      }

      &-body {
        padding: .4rem .4rem .16rem .4rem;
        overflow: hidden;
      }
    }

    &::after {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1.32rem;
      background-image: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, #000 99%);
      opacity: 0.5;
      content: ' ';
      pointer-events: none;
    }
  }

  & &-btn.@{c7n-pro-prefix}-btn {
    width: .24rem;
    height: .24rem;
    color: @text-color-dark;
    text-shadow: 0 0.02rem 0.04rem rgba(0, 0, 0, .15);
  }

  & &-btn.@{c7n-pro-prefix}-btn .@{iconfont-css-prefix} {
    display: block;
    font-size: .24rem;
    line-height: 1;
  }

  & &-btn-nav.@{c7n-pro-prefix}-btn {
    width: .32rem;
    height: .32rem;
  }

  & &-btn-nav.@{c7n-pro-prefix}-btn .@{iconfont-css-prefix} {
    font-size: .32rem;
  }

  & &-btn-nav.@{c7n-pro-prefix}-btn-lg {
    z-index: 1;
    width: .52rem;
    height: .52rem;
  }

  & &-btn-nav.@{c7n-pro-prefix}-btn-lg .@{iconfont-css-prefix} {
    font-size: .52rem;
  }

  & &-btn-close {
    position: absolute;
    top: .4rem;
    right: .4rem;
  }

  &-picture {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 100%;
    margin: 0 .4rem;
    cursor: grab;

    &-main {
      flex: 1;
      overflow: hidden;
    }

    .@{c7n-pro-prefix}-picture {
      width: 100%;
      height: 100%;
    }
  }

  &-toolbar {
    z-index: 1;
    margin-top: .4rem;
    white-space: nowrap;
    text-align: center;
  }

  &-navbar {
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: .16rem;

    &-scroll {
      display: flex;
      align-items: center;
      justify-content: space-between;

      &-container {
        margin: 0 .2rem;
        overflow: hidden;
      }
    }


    &-item {
      border: .02rem @border-style-base transparent;
      cursor: pointer;
    }

    &-current {
      border-color: @text-color-dark;
    }

    &-item::after {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      display: block;
      background-color: rgba(0, 0, 0, .3);
      transition: background-color @animation-duration-base;
      content: '';
    }

    &-current::after {
      background-color: rgba(0, 0, 0, 0);
    }
  }
}
