.app-attachments-button-icon {
  cursor: pointer;

  position: relative;
  top: 5px;

  height: 16px;
  margin: 5px;

  font-size: 20px;

  visibility: hidden;
}

.app-attachments-card-preview {
  position: relative;

  overflow: hidden;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;

  width: 155px;
  max-width: 100%;
  height: 140px;
  max-height: 100%;
  margin: 10px 10px 10px 0;
  padding: 2px 5px;

  &:hover {
    .app-attachments-button-icon {
      visibility: visible;
    }

    .app-attachments-button-icon.disabled {
      cursor: default;
      color: var(--color-gray-eee);
    }

    .app-attachments-button-preview {
      height: 20%;
    }
  }
}

.add-button {
  cursor: pointer;

  position: relative;

  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  align-self: flex-start;
  justify-content: center;

  width: 37px;
  height: 109px;
  margin: 12px 0;
  padding: 2px 5px;

  visibility: hidden;
  background: none;
  border: 1px solid var(--color-gray-eee);
  border-radius: 3px;

  &:hover {
    background-color: #f4f5f7;
  }
}

.app-attachments-href-preview {
  cursor: pointer;

  position: relative;

  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;

  box-sizing: border-box;
  width: 100%;
  height: 80%;

  font-size: 11px;

  /* Убираем подчёркивание */
  color: black;
  text-decoration: none;

  border-radius: 3px;
  box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%);

  transition: all 0.3s ease-in-out;

  &:hover {
    box-shadow: 0 8px 16px 0 rgb(0 0 0 / 20%);
  }
}

.app-attachments-file-name-block {
  display: flex;
  flex-direction: row;
  height: 50%;
  font-weight: 600;
}

.app-attachments-file-preview-block {
  z-index: 1;

  width: 100%;
  height: 36px;
  padding: 5px 10px;

  background: #f9f9f9;
}

.app-attachments-file-create-view,
.app-attachments-file-name-view {
  overflow: hidden;
  display: inline-block;

  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-attachments-file-create-view {
  height: 50%;
}

.app-attachments-file-name-view {
  max-width: calc(100% - 4.22em);
}

.app-attachments-img-preview-block {
  display: flex;
  flex-grow: 1;

  width: 100%;
  max-height: calc(100% - 36px);

  border-radius: 3px 3px 0 0;
}

.app-attachments-img-preview-size {
  position: relative;

  display: flex;
  justify-content: center;

  width: 100%;
  height: 100%;

  // У нас превьюха всегда белая, потому что емпти иконка это черный файл
  background-color: #fff;

  &:hover img {
    transform: scale(1.1);
    filter: brightness(40%);
  }
}

.app-attachments-img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;

  &.d-none {
    display: none;
  }
}

.app-attachments-default-img-preview {
  position: absolute;
  width: 80px;
  height: 80px;
}

.cards-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-top: 12px;

  &:hover {
    .app-attachments-block {
      .add-button {
        visibility: visible;
      }
    }
  }
}

.table-wrapper {
  margin-top: 12px;
}

.app-attachments-block {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
}

.app-attachments-button-preview {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 0;
}

.button {
  cursor: pointer;

  padding: 0;

  font: inherit;
  color: inherit;

  background: none;
  border: none;
  outline: inherit;
}

.menu-option {
  display: flex;
  flex-direction: row;

  .chip {
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;
    margin-left: 12px;

    background-color: var(--color-gray-eee);
    border-radius: 8px;
  }
}

.menu-option.warning {
  color: var(--ds-text-accent-red);
}

.menu-button {
  align-self: flex-start;
  margin-top: 7px;
}
