.file {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font-size: 0.75rem;
  margin: 10px 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e6e6e6;
  padding: 0.5em 0;
}

.file > span {
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.file > .tabledrag-changed {
  display: table-cell;
  padding: 0 1em;
  top: 0;
  vertical-align: middle;
  border-left: 1px solid inherit;
}

.form-managed-file .file {
  margin-bottom: 0;
}

.file-icon {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 32px;
  flex: 0 0 32px;
}

.file-icon .node-file__icon {
  display: block;
}

.file-link {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  white-space: normal;
  word-break: break-word;
}

.file-link a,
.file-link a:hover,
.file-link a:focus,
.file-link a:active {
  text-decoration: none;
  color: inherit;
  font-weight: 400;
}

.file-size {
  text-align: right;
  white-space: pre;
  vertical-align: middle;
}

.card-files {
  margin-top: 40px;
}

.card-files__grid {
  padding-left: 0;
  list-style: none;
  margin-bottom: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

.card-files__title {
  margin-bottom: 20px;
}

.card-file {
  -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.11), 0 1px 2px rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.11), 0 1px 2px rgba(0, 0, 0, 0.22);
  -webkit-box-flex: 0;
  -ms-flex: 0 0 47.5%;
  flex: 0 0 47.5%;
  margin-bottom: 13px;
  font-size: 0.75rem;
  background: #f3f3f3;
}

.card-file:hover {
  -webkit-box-shadow: 0 -1px 0 #e0e0e0, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
  box-shadow: 0 -1px 0 #e0e0e0, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24);
}

.card-file__link {
  display: block;
  position: relative;
  height: 100px;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}

.card-file__title {
  overflow: hidden;
  position: relative;
  line-height: 1.35em;
  max-height: 2.7em;
  padding-right: 1em;
  display: block;
  word-break: break-word;
  word-wrap: normal;
}

.card-file__title:before {
  content: '...';
  position: absolute;
  right: 0;
  bottom: 0;
}

.card-file__title:after {
  content: '';
  position: absolute;
  right: 0;
  width: 1em;
  height: 1em;
  margin-top: 0.2em;
  background: #f3f3f3;
}

.card-file__type {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  position: absolute;
  bottom: 12px;
  width: calc(100% - (2 * 12px));
}

.card-file__icon {
  margin-right: 8px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  width: 16px;
  height: 16px;
}

.card-file__size,
.card-file__count {
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1rem;
}

.card-file__count {
  -webkit-box-flex: 1;
  -ms-flex: 1 0 100%;
  flex: 1 0 100%;
  white-space: nowrap;
  margin: 5px 0 0 24px;
}

@media (min-width: 600px) {
  .file {
    margin-top: 5px;
  }
}

@media (min-width: 900px) {
  .card-files__grid {
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
  }
  .card-file {
    -ms-flex-preferred-size: 23%;
    flex-basis: 23%;
    margin-right: 2%;
  }
  .card-file:nth-child(4n+4) {
    margin-right: 0;
  }
}
