@use '../../../../shared/styles/variables' as *;

.avatar-crop-modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 120;

  background: $color-backdrop-strong;
  backdrop-filter: blur(3px);

}

.avatar-crop-modal {
  position: fixed;
  z-index: 130;
  top: 50%;
  left: 50%;

  width: min(720px, calc(100vw - 28px));
  height: min(680px, calc(100vh - 28px));
  padding: 18px;

  transform: translate(-50%, -50%);

  border-radius: 24px;
  background: $color-surface;
  color: $color-text;

  display: flex;
  flex-direction: column;
  gap: 14px;

  box-shadow: $shadow-modal-dark;

}

.avatar-crop-modal__header {
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  h2 {
    margin: 0;
    font-size: $font-size-18;
    font-weight: 650;
  }
}

.avatar-crop-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: $gray20;
  color: $gray50;

  cursor: pointer;
  transition: 0.2s ease;

  &:hover {
    background: $blue20;
    color: $blue;
  }

  &:disabled {
    opacity: 0.5;
    cursor: default;
  }
}

.avatar-crop-modal__cropper {
  position: relative;
  flex: 1;
  min-height: 360px;

  border-radius: 20px;
  overflow: hidden;

  background: $color-bg
}

.avatar-crop-modal__controls {
  padding: 0 4px;

  label {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  span {
    width: 82px;
    color: $gray50;
    font-size: $font-size-14;
    font-weight: 600;
  }

  input {
    width: 100%;
    accent-color: $blue;
  }
}

.avatar-crop-modal__footer {
  height: 44px;

  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.avatar-crop-modal__cancel,
.avatar-crop-modal__submit {
  height: 42px;
  border: none;
  border-radius: 14px;
  padding: 0 18px;

  font-size: $font-size-15;
  font-weight: 650;
  cursor: pointer;

  transition: 0.2s ease;

  &:disabled {
    opacity: 0.6;
    cursor: default;
  }
}

.avatar-crop-modal__cancel {
  background: $gray20;
  color: $gray50;
  opacity: .8;  
  &:hover {
    opacity: 1;
  }
}

.avatar-crop-modal__submit {
  background: $blue;
  color: $color-text-inverse;

  &:hover {
    opacity: 0.9;
  }
}

