@import '../../style/mixins';
@import '../../style/themes/default';

@avatarPrefixCls: fm-curtain;

.@{avatarPrefixCls} {
  display: block;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, @opacity-disabled);
  z-index: @curtain-zindex;

  &--closed {
    visibility: hidden;
  }

  &-container {
    display: flex;
    position: relative;
    margin: 0 auto;
    width: 80%;
    height: 100%;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  &-body {
    position: relative;
    width: 100%;
  }

  &--btn-close {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    z-index: @curtain-zindex;

    &--top {
      transform: translateX(-50%);
      top: -(@icon-size-lg + 24px);
      left: 50%;
      bottom: auto;
    }

    &--top-left {
      top: -(@icon-size-lg + 24px);
      left: 0;
      bottom: auto;
    }

    &--top-right {
      top: -(@icon-size-lg + 24px);
      left: auto;
      right: 0;
      bottom: auto;
    }

    &--bottom {
      transform: translateX(-50%);
      bottom: -(@icon-size-lg + 24px);
      left: 50%;
    }

    &--bottom-left {
      bottom: -(@icon-size-lg + 24px);
      left: 0;
    }

    &--bottom-right {
      bottom: -(@icon-size-lg + 24px);
      left: auto;
      right: 0;
    }
  }

  &--btn-close--self {
    width: @icon-size-lg;
    height: @icon-size-lg;
    border: 2px solid @border-color-base;
    border-radius: 50%;

    &::before,
    &::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      display: inline-block;
      width: @icon-size-sm;
      height: 2px;
      border-radius: 1px;
      background: @border-color-base;
    }

    &::before {
      transform: translate3d(-50%, -50%, 0) rotate(45deg);
    }

    &::after {
      transform: translate3d(-50%, -50%, 0) rotate(-45deg);
    }
  }
}

@import './rtl.less';
