/**
 *
 * This file may have been modified by Bytedance Inc. (“Bytedance Inc.'s Modifications”). 
 * All Bytedance Inc.'s Modifications are Copyright (year) Bytedance Inc..  
 * 
 * This source code is licensed under the Apache license.
 * See LICENSE file in the project root for license information.
 *
 */
@import '../../../styles/variables.less';
@import '../../../styles/mixins.less';

@img-crop-cls: ~'@{ant-prefix}-img-crop';

.@{img-crop-cls}-container {
  height: 330px;
  width: 592px;
  position: relative;
  .reactEasyCrop_Container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    user-select: none;
    touch-action: none;
    cursor: move;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .reactEasyCrop_Image,
  .reactEasyCrop_Video {
    will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */
  }

  .reactEasyCrop_Contain {
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
  .reactEasyCrop_Cover_Horizontal {
    width: 100%;
    height: auto;
  }
  .reactEasyCrop_Cover_Vertical {
    width: auto;
    height: 100%;
  }

  .reactEasyCrop_CropArea {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid @color-primary-brand;
    box-sizing: border-box;
    box-shadow: 0 0 0 9999em;
    color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
  }

  .reactEasyCrop_CropAreaRound {
    border-radius: 50%;
  }

  .reactEasyCrop_CropAreaGrid::before {
    content: ' ';
    box-sizing: border-box;
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 0;
    bottom: 0;
    left: 33.33%;
    right: 33.33%;
    border-top: 0;
    border-bottom: 0;
  }

  .reactEasyCrop_CropAreaGrid::after {
    content: ' ';
    box-sizing: border-box;
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.5);
    top: 33.33%;
    bottom: 33.33%;
    left: 0;
    right: 0;
    border-left: 0;
    border-right: 0;
  }
}

.@{img-crop-cls}-control {
  display: flex;
  align-items: center;
  width: 300px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 8px;
  .@{img-crop-cls}-slider {
    width: 260px;
    margin-left: 8px;
    margin-right: 8px;
  }
}
